/* ==========================================================================
   VARIABLES Y PALETA DE COLORES - PETSHOP CHILE (PataVerde)
   ========================================================================== */
:root {
    /* --- 1. COLORES CORPORATIVOS PRINCIPALES --- */
    --color-primary: #FE3A4A;          /* Rojo Coral principal (botones, acentos, enlaces clave) */
    --color-primary-hover: #e02e3d;    /* Tono más oscuro para estados hover del primario */
    --color-primary-subtle: #fdf2f2;   /* Fondo sutil derivado del rojo para alertas o destacados */

    --color-secondary: #FEC501;        /* Amapola Dorada (badges, destacados, estrellas) */
    --color-secondary-hover: #e5b001;  /* Tono hover para secundario */
    --color-secondary-subtle: #fffdf0; /* Fondo sutil derivado del dorado */

    /* --- 2. TIPOGRAFÍA Y TEXTOS --- */
    --color-text-main: #1e293b;        /* Texto principal (Slate oscuro muy legible) */
    --color-text-muted: #64748b;       /* Texto secundario / gris descriptivo */
    --color-text-light: #f8fafc;       /* Texto claro para fondos oscuros */

    /* --- 3. FONDOS Y SUPERFICIES --- */
    --color-bg-body: #f8fafc;          /* Fondo general de la página */
    --color-bg-surface: #ffffff;       /* Fondo de tarjetas, modales y contenedores */
    --color-bg-alt: #f1f5f9;           /* Fondo alternativo para secciones o tablas */
    --color-bg-dark: #0f172a;          /* Fondo oscuro (Hero sections, footer superior) */

    /* --- 4. BORDES Y SEPARADORES --- */
    --color-border: #e2e8f0;           /* Borde estándar de inputs, tarjetas y divisores */
    --color-border-focus: #FE3A4A;     /* Color de borde al hacer focus (con el primario coral) */

    /* --- 5. ESTADOS Y ALERTAS --- */
    --color-success: #198754;          /* Stock disponible / Éxito */
    --color-warning: #ffc107;          /* Avisos / Alertas */
    --color-danger: #dc3545;           /* Agotado / Errores / Eliminar */
    --color-info: #0dcaf0;             /* Información */
}

/* ==========================================================================
   CLASES UTILITARIAS DE APOYO (Helpers)
   ========================================================================== */

/* Colores de Texto */
.text-primary-custom { color: var(--color-primary) !important; }
.text-secondary-custom { color: var(--color-secondary) !important; }
.text-main { color: var(--color-text-main) !important; }
.text-muted-custom { color: var(--color-text-muted) !important; }

/* Colores de Fondo */
.bg-primary-custom { background-color: var(--color-primary) !important; color: #ffffff !important; }
.bg-secondary-custom { background-color: var(--color-secondary) !important; color: var(--color-text-main) !important; }
.bg-surface { background-color: var(--color-bg-surface) !important; }
.bg-alt { background-color: var(--color-bg-alt) !important; }
.bg-dark-custom { background-color: var(--color-bg-dark) !important; color: var(--color-text-light) !important; }

/* Botones Personalizados */
.btn-primary-custom {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.btn-primary-custom:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #ffffff;
}

.btn-secondary-custom {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-text-main);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.btn-secondary-custom:hover {
    background-color: var(--color-secondary-hover);
    border-color: var(--color-secondary-hover);
    color: var(--color-text-main);
}

.btn-outline-primary-custom {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background-color: transparent;
    transition: all 0.2s ease;
}
.btn-outline-primary-custom:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* Bordes y Contenedores */
.border-custom {
    border-color: var(--color-border) !important;
}

.card-custom {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}



/* ==========================================================================
   ESTILOS ESPECÍFICOS DEL HERO CAROUSEL (ProTAGONISMO MÓVIL)
   ========================================================================== */

.hero-slide-item {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 480px;
}

/* Tipografía adaptativa para títulos y textos del banner */
.hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 100%;
}

/* Comportamiento y protagonismo de la imagen en celular */
.hero-img {
    max-height: 220px;
    min-height: 180px;
}

/* Estilos específicos para pantallas grandes (Desktop / Laptops) */
@media (min-width: 992px) {
    .hero-slide-item {
        min-height: 500px;
    }

    .hero-title {
        font-size: calc(1.4rem + 1.8vw);
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 1.15rem;
        max-width: 500px;
    }

    .hero-img {
        max-height: 380px;
        min-height: 280px;
    }
}

/* Efectos visuales de apoyo */
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hover-scale {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease-in-out;
}

.hover-scale:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 3rem rgba(254, 58, 74, 0.25) !important;
}

/* ==========================================================================
   ESTILOS SECCIÓN DE GARANTÍAS / BENEFICIOS (PATA VERDE)
   ========================================================================== */

.guarantees-banner {
    background-color: rgba(254, 58, 74, 0.06); /* Tinta muy suave de Rojo Coral */
    border: 1px solid rgba(254, 58, 74, 0.2);  /* Borde fino y armónico */
    transition: all 0.3s ease;
}

.guarantee-card {
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.guarantee-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(254, 58, 74, 0.12) !important;
    border-color: rgba(254, 58, 74, 0.3);
}


/* ==========================================================================
   ESTILOS DEL FOOTER - PETSHOP CHILE
   ========================================================================== */

/* Transición suave para los enlaces del footer al pasar el cursor */
.footer-link {
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-link:hover {
    color: var(--color-primary, #FE3A4A) !important;
    transform: translateX(3px);
}

/* Efecto hover elegante para los iconos de redes sociales */
.social-icon {
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-icon:hover {
    color: var(--color-primary, #FE3A4A) !important;
    transform: translateY(-2px);
}

/* Efecto para el enlace de la agencia de desarrollo */
.agency-link {
    transition: color 0.2s ease;
}

.agency-link:hover {
    color: var(--color-primary, #FE3A4A) !important;
}


/* ==========================================================================
   ESTILOS VISTA DETALLE DE PRODUCTO (PRODUCT SHOW)
   ========================================================================== */

.product-detail-container {
    animation: fadeInPage 0.3s ease-in-out;
}

.product-image-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

.product-image-container {
    height: 320px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
}

.product-main-img {
    transition: transform 0.3s ease;
}

.product-main-img:hover {
    transform: scale(1.03);
}

@media (min-width: 992px) {
    .product-image-container {
        height: 420px;
    }
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   ESTILOS COMPONENTE BREADCRUMBS
   ========================================================================== */

.breadcrumb-custom {
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.breadcrumb-link {
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--color-primary, #FE3A4A) !important;
}

/* Ajuste del separador predeterminado de Bootstrap para mayor limpieza visual */
.breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8;
}


/* ==========================================================================
   ESTILOS COMPONENTE ADD-TO-CART & VARIANTES
   ========================================================================== */

/* Transición suave para la selección de variantes */
.btn-outline-secondary {
    border-color: #cbd5e1;
    transition: all 0.2s ease-in-out;
}

.btn-outline-secondary:hover {
    border-color: var(--color-primary, #FE3A4A);
    color: var(--color-primary, #FE3A4A);
    background-color: #ffffff !important;
}

/* Estilo para los botones de cantidad (+ / -) */
.input-group .btn-outline-secondary {
    background-color: #f8fafc;
    color: #334155;
}

.input-group .btn-outline-secondary:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}



/* ==========================================================================
   ESTILOS CABECERA DE CATEGORÍA SLIM (UNA SOLA LÍNEA)
   ========================================================================== */

.category-header-slim {
    background: linear-gradient(135deg, rgba(254, 58, 74, 0.02) 0%, rgba(254, 197, 1, 0.05) 100%);
    border: 1px solid rgba(254, 58, 74, 0.1);
}

.category-icon-box-slim {
    width: 38px;
    height: 38px;
    background-color: #ffffff;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

.category-badge-slim {
    background-color: rgba(254, 58, 74, 0.08);
    color: var(--color-primary, #FE3A4A);
    border: 1px solid rgba(254, 58, 74, 0.15);
}



/* ==========================================================================
   ESTILOS ADICIONALES PARA PRODUCTOS AGOTADOS Y GRILLA
   ========================================================================== */

.filter-cloud-card {
    border-color: rgba(254, 58, 74, 0.1) !important;
}

.product-grid-container {
    min-height: 350px;
    position: relative;
    isolation: isolate;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 1rem;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.product-grid-container.is-loading #productos-grid {
    opacity: 0.35;
    filter: blur(2px);
    transform: translateY(4px) scale(0.995);
    pointer-events: none;
}

.product-grid-container.is-loading .loading-overlay {
    opacity: 1;
    visibility: visible;
}

#productos-grid {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition: opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

.product-card {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2.5rem rgba(254, 58, 74, 0.12) !important;
    border-color: rgba(254, 58, 74, 0.2) !important;
}

/* Efecto visual opcional para tarjetas de productos agotados */
.product-out-of-stock img {
    opacity: 0.7;
}

.product-card-img {
    transition: transform 0.3s ease;
}

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

.hover-btn {
    transition: background-color 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.hover-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
    border-color: var(--color-primary-hover, #e02e3d) !important;
}

/* ==========================================================================
   ESTILOS VISTA DE REGISTRO
   ========================================================================== */

.register-view-container {
    animation: fadeInRegister 0.3s ease-in-out;
}

.register-card {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
}

.back-link {
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--color-primary, #FE3A4A) !important;
}

@keyframes fadeInRegister {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   ESTILOS VISTA DE REGISTRO
   ========================================================================== */

.register-view-container {
    animation: fadeInRegister 0.3s ease-in-out;
}

.register-card {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
}

.back-link {
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--color-primary, #FE3A4A) !important;
}

@keyframes fadeInRegister {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   ESTILOS VISTA VERIFICAR CORREO
   ========================================================================== */

.verify-view-container {
    animation: fadeInVerify 0.3s ease-in-out;
}

.verify-card {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
}

.verify-icon-box {
    width: 70px;
    height: 70px;
    background-color: rgba(25, 135, 84, 0.1);
    border: 2px solid rgba(25, 135, 84, 0.2);
}

.verify-link {
    transition: color 0.2s ease;
}

.verify-link:hover {
    color: var(--color-primary, #FE3A4A) !important;
}

@keyframes fadeInVerify {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   ESTILOS MINI CARRITO DESPLEGABLE (DROPDOWN)
   ========================================================================== */

.cart-toggle-btn {
    transition: background-color 0.2s ease;
}

.cart-toggle-btn:hover {
    background-color: #f1f5f9 !important;
}

.cart-dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    animation: fadeInDropdown 0.2s ease-in-out;
}

.cart-count-badge {
    background-color: var(--color-primary-subtle, #fdf2f2);
    color: var(--color-primary, #FE3A4A);
    border: 1px solid rgba(254, 58, 74, 0.15);
}

.cart-items-container::-webkit-scrollbar {
    width: 4px;
}

.cart-items-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.cart-view-btn {
    transition: all 0.2s ease;
}

.cart-view-btn:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.cart-checkout-btn {
    transition: background-color 0.2s ease;
}

.cart-checkout-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* ==========================================================================
   ESTILOS VISTA MI CUENTA Y PERFIL
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

.account-view-container {
    animation: fadeInAccount 0.3s ease-in-out;
}

.account-section-card {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.account-icon-box {
    background-color: rgba(254, 58, 74, 0.08);
    border: 1px solid rgba(254, 58, 74, 0.15);
}

.account-pill-link {
    transition: all 0.2s ease;
}

.account-pill-link:hover {
    background-color: #f1f5f9 !important;
    color: var(--color-primary, #FE3A4A) !important;
}

.account-back-btn {
    transition: all 0.2s ease;
}

.account-back-btn:hover {
    border-color: var(--color-primary, #FE3A4A);
    color: var(--color-primary, #FE3A4A);
}

@keyframes fadeInAccount {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   ESTILOS FORMULARIO PERFIL / TIPO DE CLIENTE
   ========================================================================== */

.profile-company-card {
    background-color: var(--color-primary-subtle, #fdf2f2) !important;
    border: 1px solid rgba(254, 58, 74, 0.15) !important;
}

.cursor-pointer {
    cursor: pointer;
}

.save-profile-btn {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.save-profile-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
    transform: translateY(-1px);
}


/* ==========================================================================
   ESTILOS GESTOR DE DIRECCIONES
   ========================================================================== */

.address-item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.address-item-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.04);
}

.add-address-btn {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.add-address-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   MEJORA DE VISIBILIDAD PARA INPUTS, SELECTS Y TEXTAREAS
   ========================================================================== */

.form-control,
.form-select {
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important; /* Un borde gris más visible por defecto */
    color: #0f172a !important;
    transition: all 0.2s ease-in-out;
}

/* Estado al pasar el mouse (hover) para dar pistas visuales */
.form-control:hover,
.form-select:hover {
    border-color: #94a3b8 !important;
}

/* Estado cuando el usuario hace clic (focus) destacando con el color corporativo */
.form-control:focus,
.form-select:focus {
    background-color: #ffffff !important;
    border-color: var(--color-primary, #FE3A4A) !important;
    box-shadow: 0 0 0 4px rgba(254, 58, 74, 0.15) !important; /* Sombra sutil color Rojo Coral */
}

/* Placeholder más legible */
.form-control::placeholder {
    color: #64748b !important;
    opacity: 1;
}


/* ==========================================================================
   ESTILOS GESTOR DE TELÉFONOS
   ========================================================================== */

.phone-item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.phone-item-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.04);
}

.save-phone-btn {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.save-phone-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
    transform: translateY(-1px);
}


/* ==========================================================================
   ESTILOS COMPONENTE SEGURIDAD Y CUENTA
   ========================================================================== */

.security-card {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.save-avatar-btn,
.update-pass-btn {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.save-avatar-btn:hover,
.update-pass-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
    transform: translateY(-1px);
}


/* ==========================================================================
   ESTILOS LISTA DE DESEOS (WISHLIST)
   ========================================================================== */

.wishlist-card {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease;
}

.wishlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2.5rem rgba(254, 58, 74, 0.12) !important;
    border-color: rgba(254, 58, 74, 0.2) !important;
}

.wishlist-img {
    transition: transform 0.3s ease;
}

.wishlist-card:hover .wishlist-img {
    transform: scale(1.05);
}

.wishlist-remove-btn {
    transition: all 0.2s ease;
}

.wishlist-remove-btn:hover {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
}

.wishlist-add-btn {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.wishlist-add-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
    transform: translateY(-1px);
}

.wishlist-empty-btn {
    transition: background-color 0.2s ease;
}

.wishlist-empty-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
}


/* ==========================================================================
   ESTILOS VISTA DE CONTACTO (CORREGIDOS CON PALETA OFICIAL)
   ========================================================================== */

.contact-view-container {
    animation: fadeInContact 0.3s ease-in-out;
}

.contact-info-card {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.contact-link {
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--color-secondary, #FEC501) !important;
}

.social-icon-btn {
    transition: all 0.2s ease;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.social-icon-btn:hover {
    background-color: var(--color-secondary, #FEC501) !important;
    border-color: var(--color-secondary, #FEC501) !important;
    color: var(--color-text-main, #1e293b) !important;
}

/* Forzar bordes claros y visibles en los inputs de esta vista */
.contact-view-container .form-control,
.contact-view-container .form-select {
    border: 1.5px solid #cbd5e1 !important;
}

.contact-view-container .form-control:focus {
    border-color: var(--color-primary, #FE3A4A) !important;
    box-shadow: 0 0 0 4px rgba(254, 58, 74, 0.15) !important;
}

.contact-submit-btn {
    background-color: var(--color-primary, #FE3A4A);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-submit-btn:hover {
    background-color: var(--color-primary-hover, #e02e3d) !important;
    transform: translateY(-1px);
}

@keyframes fadeInContact {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
