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

body {
    /*background-color: #006A4E; /* Verde oscuro - fondo patrio*/
    /*background-color: #05667e; /* Azul claro - fondo campechanidad */
    /*background: linear-gradient(to bottom, #006400, #228B22); /* Verdes navideños */
    background-color: #f9d6d5;
    /* Rosa - fondo genérico */
    color: #ffffff;
    /*color: #FF0080;*/
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

/* Container - equivalente a Bootstrap container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- NUEVO SISTEMA GRID OPTIMIZADO --- */

/* Contenedor general para los logos principales del Header (6 logos) */
.row {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en celular */
    gap: 15px;
    margin-bottom: 20px;
}

/* Contenedor específico para el listado de catálogos */
#pdf-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en celular */
    gap: 15px;
}

/* Responsive - md (768px+) para Tablets y Escritorio */
@media (min-width: 768px) {
    .row {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas arriba para logos */
    }
    
    #pdf-items {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas abajo para catálogos */
    }
}

/* Utilidades de Bootstrap que usas */
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.d-none { display: none; }
.d-flex { display: flex; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

/* Botón - equivalente a btn btn-success */
.btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* WhatsApp button específico */
.whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: auto;
    background-color: #01b988;
}

/* --- FIX DESBORDE HORIZONTAL --- */

.card {
    min-width: 0; /* Crucial: permite que la tarjeta se encoja para caber en la pantalla del celular */
    height: 100%; /* Hace que todas las tarjetas midan lo mismo de alto */
}

.card-body {
    padding: 0.5rem; /* Reducimos el padding, 1.25rem era demasiado espacio en blanco para móvil */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 0.95rem; /* Letra ligeramente más pequeña */
    word-wrap: break-word; /* Si un título es muy largo (ej. "Profesional e Industrial"), lo rompe en dos líneas */
    margin-bottom: 0.5rem;
}

/* Modificamos tu clase caratulas existente */
.caratulas {
    width: 100%; /* Obliga a la imagen a no salirse de su columna */
    max-width: 180px; /* Le ponemos un tope para que no crezcan de más en pantallas grandes */
    height: auto;
    margin: 0 auto;
}

/* Thumbnail - equivalente a img-thumbnail */
.img-thumbnail {
    padding: 0.25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    max-width: 100%;
    height: auto;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.img-thumbnail:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.titulo {
    font-family: 'Brush Script MT', cursive;
    font-size: 50px;
}

.subtitulo {
    font-family: 'Brush Script MT', cursive;
    font-size: 30px;
}

/* Responsive para títulos */
@media (max-width: 767px) {
    .titulo {
        font-size: 2rem;
    }
    .subtitulo {
        font-size: 1.5rem;
    }
}

/* Decoraciones de header */
#header-decoration h1 {
    font-size: 2rem;
    color: #dc3545;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

img {
    cursor: pointer;
}

.svg-aspect-ratio {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
}

