﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.h1, h1 {
    line-height: 1.2;
    text-align-last: center
}

/*responsive*/

.grid-departamentos {
    display: grid;
    gap: 15px;
    margin-top: 20px;
    grid-template-columns: repeat(2, 1fr);
}

.catalogo-title {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    padding: 6px;
    min-height: 32px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.2;
    max-height: calc(1.2em * 2);
}

/* 📱 TABLET */
@media (min-width: 768px) {
    .grid-departamentos {
        grid-template-columns: repeat(4, 1fr);
    }
    .catalogo-title {
        font-size: 10px;
    }

    .catalogo-preview {
        height: 220px;
        overflow: hidden;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .catalogo-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 🔥 clave */
    }

    .catalogo-preview::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        height: 100%;
        background: white;
        z-index: 2;
    }
}
/* 💻 ESCRITORIO */
@media (min-width: 1200px) {
    .grid-departamentos {
        grid-template-columns: repeat(6, 1fr);
    }
    .catalogo-title {
        font-size: 11px;
        max-height: calc(1.2em * 2)
    }
}
/* MOBIL */
@media (max-width: 480px) {
    .grid-departamentos {
        grid-template-columns: repeat(2, 1fr);
    }

    .h1, h1 {
        font-size: 15px;
    }
    
    .catalogo-title {
        font-size: 10px;
    }

    .buscador-inline {
        flex-direction: row; /* o column si quieres debajo */
        gap: 5px;
    }

    .buscador-inline input {
        font-size: 14px;
    }

    .buscador-inline button {
        padding: 6px 10px;
    }

    .catalogo-preview {
        height: 220px;
        overflow: hidden;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .catalogo-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 🔥 clave */
    }

    .catalogo-preview::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 20px; 
        height: 100%;
        background: white;
        z-index: 2;
    }

    .catalogo-preview iframe {
        width: 140%;
        height: 900px;
        transform: translate(-10%, -120px);
        pointer-events: none;
    }

    .btn-copiar {
        width: 100%;
        font-size: 12px;
        padding: 8px;
    }

    footer {
        font-size: 11px; /* 🔥 más compacto */
    }
}

/*CARTILLA DEPARTAMENTOS*/

.card-departamento {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: 0.3s;
}

    .card-departamento:hover {
        transform: translateY(-5px) scale(1.03);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

.card-link {
    text-decoration: none;
    color: inherit;
}

.card {
    padding: 20px;
    border-radius: 12px;
    background: #f5f5f5;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
}


.ver-text {
    display: block;
    margin-top: 10px;
    color: #007bff;
    font-weight: 600;
}


/*CARTILLA CATEGORIAS*/

.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.catalogo-preview.empty {
    height: 160px;
    background: #f0f0f0;
    border: 1px dashed #ccc;
}

.catalogo-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalogo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .catalogo-item .btn-copiar {
        margin-top: 10px;
        width: 90%;
    }

.catalogo-preview {
    height: 220px;
    overflow: hidden;
    background: white;
}

    .catalogo-preview iframe {
        width: 120%;
        height: 800px;
        transform: translate(-10%, -120px);
        pointer-events: none;
    }

    .catalogo-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.catalogo-body {
    padding: 15px;
    text-align: center;
}

    .catalogo-body h5 {
        font-size: 16px;
        margin-bottom: 10px;
    }

.btn-catalogo,
.btn-ver {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.btn-catalogo {
    background: #007bff;
    color: #fff;
}

.btn-ver {
    background: #28a745;
    color: #fff;
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.categoria-btn {
    background: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

    .categoria-btn:hover {
        animation: shake 0.5s;
        animation-iteration-count: infinite;
    }

.btn-copiar {
    margin-top: 5px;
    padding: 4px 6px; 
    font-size: 11px; 
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    /* 🔥 estado normal hover */
    .btn-copiar:hover {
        background: #007bff;
        color: white;
    }

    /* 🔥 estado copiado */
    .btn-copiar.copiado {
        background: #28a745;
        color: white;
    }

/*buscador*/

.buscador {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

    .buscador input {
        width: 300px;
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #ccc;
    }

    .buscador button {
        padding: 10px 15px;
        border: none;
        background: #007bff;
        color: white;
        border-radius: 8px;
        cursor: pointer;
    }

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* 🔥 CLAVE */
    gap: 10px;
    padding: 10px;
}