﻿/* ---------- Base / Layout ---------- */
html {
    height: 100%;
}

body {
    min-height: 100%; /* ← min-height, NO height */
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    background: #f6f7fb;
    color: #222;
}

/* CAMBIAR ESTO */
footer {
    margin-top: auto;
    background: #212529;
    color: #fff;
}

/* ---------- Cards Grid for Products ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

/* Desktop / larger screens */
@media(min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    /* 3 columnas en pantallas medianas */
}

@media(min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    /* 4 columnas en pantallas anchas */
}

/* Card style */
.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(30, 40, 50, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

/* Imagen centrada y recortada */
.product-image {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
}

    .product-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* mantén proporción, centra la imagen */
    }

/* Contenido */
.product-body {
    padding: 0.8rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.product-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 2.4rem; /* evita saltos en tarjetas */
}

.product-category {
    font-size: 0.85rem;
    color: #6b6f76;
}

.product-price {
    font-weight: 700;
    color: #0b5ed7;
    margin-top: auto;
}

/* Acciones */
.product-actions {
    padding: 0.8rem 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.btn-primary-custom {
    background: linear-gradient(90deg,#0d6efd,#0b5ed7);
    color: #fff;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(11,94,215,0.12);
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid #dee2e6;
    color: #333;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
}

/* ---------- Table fallback (keeps responsive) ---------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* ---------- Form / Auth tweaks ---------- */
.auth-card {
    max-width: 420px;
    margin: 0 auto;
    margin-top: 2rem;
}

    .auth-card .card {
        border-radius: 12px;
        overflow: hidden;
    }

.form-control {
    border-radius: 8px;
}

/* Alerts */
.alert {
    border-radius: 8px;
}

/* Small screens tweaks */
@media (max-width: 576px) {
    .product-image {
        height: 140px;
    }

    .products-grid {
        gap: 0.75rem;
        padding: 0 8px;
    }
}

.category-card .card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: bold;
    background: white;
}

    .category-card .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
        cursor: pointer;
    }

/* HERO IMAGE */
.hero-section {
    border-radius: 0;
}

/* CATEGORY CARDS */
.category-card {
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    }

.category-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}


.card:hover {
    transform: scale(1.02);
    transition: 0.2s ease-in-out;
}

.card img {
    transition: 0.3s ease-in-out;
}

.card:hover img {
    filter: brightness(0.9);
}

.product-image-container img {
    transition: transform 0.3s ease-in-out;
}

.product-image-container:hover img {
    transform: scale(1.1);
}

/* ============================= */
/* LIGHTBOX ESTILO PREMIUM MIX   */
/* ============================= */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    animation: fadeIn .3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 12px;
    animation: zoomIn .25s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,.4);
}

.close-btn {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 28px;
    background: white;
    border: none;
    border-radius: 50%;
    padding: 5px 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    background: rgba(0,0,0,0.35);
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    border-radius: 10px;
}

    .nav-btn.left {
        left: -60px;
    }

    .nav-btn.right {
        right: -60px;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- PRODUCTOS BY CATEGORY --- */

.product-image-container {
    height: 200px;
    background: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

    .product-image:hover {
        transform: scale(1.03);
    }

/* --- MODAL --- */

.img-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
}

.img-modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.img-modal-close {
    position: absolute;
    top: 25px;
    right: 40px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .product-image-container {
        height: 150px;
    }
}


/* ============================================================
   FOOTER PREMIUM - DARK THEME (Actualizado y Centrado)
   ============================================================ */
.premium-footer {
    background: #0b1120; /* Mismo fondo premium de tu top-bar */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0 1rem 0;
}

    .premium-footer .footer-container {
        max-width: 1400px; /* Alineado con tu navbar */
        margin: 0 auto;
        padding: 0 1.5rem;
    }

.footer-content {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* 👇 AGREGADO: Exactamente lo mismo que hicimos en el header para el Logo del Footer 👇 */
.premium-footer .brand-block {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

    .premium-footer .brand-block img {
        height: 125px;
        width: auto;
        max-height: none;
        margin-top: -30px;
        margin-bottom: -30px;
        position: relative;
        z-index: 10;
    }

.premium-footer .brand-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    margin-left: -8px;
}

.premium-footer .brand-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    margin-left: -8px;
}

/* 👇 AGREGA ESTO PARA DARLE ESTILO AL TEXTO AZUL 👇 */
.premium-footer .brand-sub {
    display: block !important; /* Fuerza a que siempre se vea */
    color: #3b82f6; /* El color azulito */
    font-size: 0.95rem;
    font-weight: 600;
    margin-left: -5px;
}

/* 👆 FIN AGREGADO LOGO 👆 */

/* Divisor vertical como el del header (separa el logo de los links) */
.footer-divider {
    width: 1px;
    height: 35px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 1.5rem; /* Le da aire al logo y a los links */
}

/* Contenedor de los links - ¡Aquí hacemos la magia de centrar! */
.footer-links {
    display: flex;
    align-items: center;
    justify-content: center; /* Centra los links en su bloque */
    flex: 1; /* Esto hace que ocupe todo el espacio derecho, centrando los items perfectamente */
    flex-wrap: wrap;
    gap: 1.2rem; /* Espacio entre el texto y la barra */
}

    .footer-links a {
        color: #94a3b8;
        font-size: 1.1rem; /* 🔥 LETRA MÁS GRANDE (antes 0.875rem) */
        font-weight: 500;
        text-decoration: none;
        transition: color 0.2s ease;
        display: flex;
        align-items: center;
        gap: 1.2rem; /* Espacio interno para separar el texto del palito | */
    }

        .footer-links a:hover {
            color: #3b82f6;
        }

        /* 🔥 LAS BARRAS DIVISORIAS (|) GENERADAS CON CSS PURO */
        .footer-links a:not(:last-child)::after {
            content: "|";
            color: rgba(255, 255, 255, 0.2); /* Un gris sutil para que no pelee con el texto */
            font-weight: 300;
        }

/* Parte de abajo (Copyright) */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    text-align: center;
    color: #64748b;
    font-size: 1.05rem; /* 🔥 LETRA MUCHO MÁS GRANDE (antes 0.8rem) */
    font-weight: 900;
    letter-spacing: 0.5px; /* Un toquecito de espacio entre letras para que se vea más elegante */
}

/* ── RESPONSIVE PARA MÓVILES ── */
@media (max-width: 768px) {
    .premium-footer {
        padding: 3rem 0 1.5rem 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
        margin-bottom: 2.5rem;
    }

    /* 👇 AGREGADO: Ajuste del logo para móviles en el footer 👇 */

    /* Mantiene el bloque de logo e imagen centrado en la pantalla */
    .premium-footer .brand-block {
        justify-content: center !important;
    }

        .premium-footer .brand-block img {
            height: 95px !important;
            margin-top: 0 !important;
            margin-bottom: 0 !important;
        }

    .premium-footer .brand-name {
        font-size: 1.5rem !important;
        text-align: left !important; /* Evita que el nombre se centre raro */
        margin-left: 5px !important; /* 👈 AUMENTA ESTE NÚMERO (ej. 10px o 15px) para mover "FraGo" a la derecha */
    }

    /* 👇 AGREGA ESTO PARA ASEGURAR QUE SE VEA Y SE ALINEE 👇 */
    .premium-footer .brand-sub {
        display: block !important;
        font-size: 0.85rem !important;
        margin-top: -3px;
        text-align: left !important; /* Alinea el texto a la izquierda, junto al logo */
        margin-left: 5px !important; /* 👈 AUMENTA ESTE NÚMERO (ej. 10px o 15px) para mover la frase azul a la derecha y cuadrarla con el nombre */
    }

    /* 👆 FIN AGREGADO LOGO MÓVIL 👆 */

    /* El divisor vertical pasa a ser horizontal en celulares */
    .footer-divider {
        width: 80px;
        height: 1px;
        margin: 0;
    }

    .footer-links {
        justify-content: center;
        gap: 1.2rem;
    }

        .footer-links a {
            font-size: 1rem;
            gap: 1rem;
        }

    /* En pantallas muy pequeñas (celulares), ocultamos la barra divisoria para que fluya mejor hacia abajo */
    @media (max-width: 480px) {
        .footer-links a:not(:last-child)::after {
            content: "";
        }
    }
}

/* ============================================================
   TOAST GLOBAL — Copiado de product-details para todas las páginas
   ============================================================ */
.toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.custom-toast {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 320px;
    max-width: 420px;
    transform: translateX(150%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    border-left: 5px solid #2563eb;
    position: relative;
    overflow: hidden;
}

    .custom-toast.show {
        transform: translateX(0);
        opacity: 1;
    }

    .custom-toast.toast-error {
        border-left-color: #ef4444;
    }

    .custom-toast.toast-success {
        border-left-color: #10b981;
    }

    .custom-toast.toast-warning {
        border-left-color: #f59e0b;
    }

.toast-icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
}

    .toast-progress::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        background: currentColor;
        opacity: 0.4;
        animation: toast-progress 5s linear forwards;
    }

.toast-error .toast-progress {
    color: #ef4444;
}

.toast-success .toast-progress {
    color: #10b981;
}

.toast-warning .toast-progress {
    color: #f59e0b;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@media (max-width: 768px) {
    .toast-container {
        width: 90% !important;
        max-width: 400px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        top: auto !important;
        bottom: 20px !important;
    }

    .custom-toast {
        width: 100% !important;
        min-width: 0 !important;
        padding: 12px 15px !important;
        border-radius: 12px !important;
    }
}