/* Hub de documentación — misma línea visual que RecepcionApi.Api/wwwroot (header corporativo) */

html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

a {
    color: #77b7db;
}

a:hover {
    color: #12b2fc;
}

/* Header (alineado con .custom-header de la API Recepción) */
.custom-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #15376e 0%, #000000 50%, #15376e 100%);
    background-size: 200% 100%;
    animation: gradientShift 4s ease infinite;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 3px solid #12b2fc;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.custom-header .logo {
    display: flex;
    align-items: center;
}

.custom-header .logo img {
    height: 50px;
    width: auto;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.custom-header .logo img:hover {
    opacity: 0.85;
}

.custom-header .logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.custom-header .logo a:hover {
    transform: scale(1.03);
}

.custom-header .header-title {
    flex: 1;
    min-width: 200px;
}

.custom-header .header-title h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00BFFF 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.custom-header .header-title p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Contenido */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.intro {
    margin-bottom: 2.5rem;
}

.intro--hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}

.intro--hero h2 {
    margin: 0 auto 1.125rem;
    max-width: 22ch;
    width: 100%;
    font-size: clamp(1.75rem, 4.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: center;
    background: linear-gradient(135deg, #00bfff 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro--hero p {
    margin: 0 auto;
    max-width: min(52rem, 100%);
    width: 100%;
    padding: 0 0.5rem;
    line-height: 1.75;
    color: #94a3b8;
    font-size: 1rem;
    text-align: center;
}

.intro--hero p strong {
    font-weight: 600;
    color: #e2e8f0;
}

/* Catálogo */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(18, 178, 252, 0.25);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    border-color: rgba(18, 178, 252, 0.55);
    transform: translateY(-2px);
}

/* Subtítulo: primera línea, encima de icono + título */
.product-card .subtitle {
    margin: 0 0 0.9rem;
    font-size: 0.6rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

/* Fila: icono (izq) + título (der) */
.product-card-title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.product-card-title-row--no-icon {
    gap: 0;
}

.product-card-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-icon--text {
    font-size: 1.35rem;
    line-height: 1;
    background: rgba(18, 178, 252, 0.12);
    border: 1px solid rgba(18, 178, 252, 0.35);
}

.product-card-icon--img {
    padding: 0;
    background: rgba(18, 178, 252, 0.12);
    border: 1px solid rgba(18, 178, 252, 0.35);
    overflow: hidden;
}

.product-card-icon--img img {
    width: 1.65rem;
    height: 1.65rem;
    object-fit: contain;
}

/* SVG definido en products.json (icon): usar fill/stroke="currentColor" para el azul corporativo */
.product-card-icon--inline-svg {
    background: rgba(18, 178, 252, 0.12);
    border: 1px solid rgba(18, 178, 252, 0.35);
    color: #12b2fc;
}

.product-card-icon--inline-svg > svg {
    width: 1.45rem;
    height: 1.45rem;
    display: block;
    flex-shrink: 0;
}

.product-card-title-row h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    background: linear-gradient(to right, #00bfff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-card p.description {
    flex: 1;
    margin: 0.85rem 0 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.product-tags span {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(119, 183, 219, 0.15);
    color: #94a3b8;
}

.product-card .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin-top: auto;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    background: linear-gradient(135deg, #12b2fc 0%, #77b7db 100%);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.product-card .btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.product-card .btn-primary__label {
    flex-shrink: 0;
}

.product-card .btn-primary__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    color: inherit;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card .btn-primary__arrow svg {
    display: block;
}

.product-card .btn-primary:hover .btn-primary__arrow {
    transform: translateX(6px) scale(1.06);
}

/* Footer */
.site-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}

.site-footer p {
    margin: 0.35rem 0;
}

/* Estados */
.loading-msg,
.error-msg {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
}

.error-msg {
    color: #fca5a5;
}
