/* 
* Almitas Peludas - Estilos "Campo & Hogar" 
* Theme: Warm Farm / Pet Friendly
*/

:root {
    /* Paleta Campo/Granja (Light Theme por defecto) */
    --primary: #7FA968;
    --primary-dark: #5D7E4C;
    --primary-light: #A5C992;
    --secondary: #D98E56;
    --secondary-light: #EBB689;

    --background: #FDFBF7;
    --surface: #FFFFFF;
    --surface-alt: #F7F4EC;

    --text: #4A3E38;
    --text-secondary: #857870;
    --text-muted: #B0A6A0;

    --border: #E8E2D9;

    --success: #7FA968;
    --error: #D65A5A;
    --warning: #EBCB8B;

    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(74, 62, 56, 0.08);
    --shadow-hover: 0 8px 30px rgba(74, 62, 56, 0.12);

    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* Paleta Modo Oscuro Extremo */
    --background: #0A0A0A;
    --surface: #141414;
    --surface-alt: #1F1F1F;

    --text: #F8F9FA;
    --text-secondary: #ADB5BD;
    --text-muted: #6C757D;

    --border: #2B2B2B;

    --primary: #A5C992; 
    --primary-dark: #7FA968;
    --primary-light: #C4E1B5;
    
    --secondary: #E3A373;
    --secondary-light: #F2C8AA;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.7);

    --split-bg-70: #1A1A1A; /* Para el 70% de contraste */
}

body {
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
}

/* El efecto del 70% de contraste de modo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70vh;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-alt) 100%);
    z-index: -1;
    border-bottom: 2px solid var(--primary-dark);
    transition: background 0.4s ease;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Tipografía */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilidades */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.text-gradient {
    color: var(--secondary);
    /* Fallback simplificado para mejor lectura en tema claro */
}

/* Componentes */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(127, 169, 104, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary);
    color: white;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

/* Material Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 600ms linear;
    background-color: rgba(255, 255, 255, 0.4);
}
@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

/* Tablas Admin */
.table-container {
    overflow-x: auto;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--surface-alt);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

tr:hover td {
    background: var(--surface-alt);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.badge-pendiente {
    background: rgba(235, 203, 139, 0.2);
    color: #8a6a2e;
    border: 1px solid var(--warning);
}

.badge-confirmado {
    background: rgba(127, 169, 104, 0.2);
    color: var(--primary-dark);
    border: 1px solid var(--primary);
}

.badge-completado,
.badge-entregado {
    background: var(--primary);
    color: white;
}

.badge-cancelado {
    background: rgba(214, 90, 90, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

.badge-en_reparto {
    background: var(--secondary-light);
    color: white;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--surface-alt);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
}

/* Header */
.header {
    background: var(--surface);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.cart-link {
    background: var(--surface-alt);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: var(--text);
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at center, var(--surface-alt) 0%, var(--background) 100%);
    position: relative;
    overflow: hidden;
}

/* Adorno sutil de fondo (huellitas o manchitas) */
.hero::before {
    content: '🐾';
    position: absolute;
    top: 10%;
    left: 10%;
    font-size: 3rem;
    opacity: 0.05;
    transform: rotate(-15deg);
}

.hero::after {
    content: '🍂';
    position: absolute;
    bottom: 20%;
    right: 15%;
    font-size: 4rem;
    opacity: 0.05;
    transform: rotate(20deg);
}


.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

.diferencial-card {
    background: var(--surface-alt);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
}

.diferencial-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.products-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-mini-card {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--border);
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .products-mini-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

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

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.social-link {
    color: rgba(255, 255, 255, 0.8);
}

.social-link:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 5px 0;
    border-radius: 3px;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(127, 169, 104, 0.15);
    color: var(--primary-dark);
    border: 1px solid var(--primary);
}

.alert-error {
    background: rgba(214, 90, 90, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

@media (max-width: 768px) {
    /* Ocultar NAV tradicional */
    .nav {
        display: none !important;
    }
    
    .nav-toggle {
        display: none !important; /* Ahora usamos Bottom Nav */
    }

    /* Padding inferior al body para no pisar contenido con el bottom nav */
    body {
        padding-bottom: 70px;
    }

    /* Bottom Navigation Bar (App Nativa) */
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background-color: var(--surface);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        border-top: 1px solid var(--border);
        padding-bottom: env(safe-area-inset-bottom); /* iOS support */
    }

    /* Ocultar footer normal en móviles (suplido por Bottom Nav) */
    .footer {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* Base Bottom Nav Estilos */
.bottom-nav {
    display: none; /* Oculto en desktop por defecto */
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 25%;
    height: 100%;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}
.bottom-nav-item .icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}
.bottom-nav-item.active {
    color: var(--primary);
}
.bottom-nav-item.active .icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* =========================================
   SPLIT LOGO ANIMATION (Mitad Perro/Gato)
========================================= */
.split-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 4px solid var(--primary);
    background: white; /* Siempre fondo blanco según pedido */
}

.logo-half {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.logo-half-left {
    border-right: 1px solid rgba(0,0,0,0.1); /* Sutil línea divisoria */
}

.logo-half .logo-bg {
    position: absolute;
    top: 0;
    width: 200px; /* Ancho total de la imagen */
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.6s ease-in-out;
}

.logo-half-left .logo-bg {
    left: 0;
    background-image: url('../img/logos/logo-1.jpg');
}

.logo-half-right .logo-bg {
    right: 0;
    background-image: url('../img/logos/logo-2.jpg');
}