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

body {
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background: #f4f5f7;
    color: #1f2937;
    line-height: 1.5;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.contenedor {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cabecera {
    padding: 24px 0 8px 0;
    text-align: center;
}

.marca {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 30px;
    font-weight: 400;
    color: #1f2937;
    letter-spacing: 1px;
    text-decoration: none;
}

.marca:hover {
    text-decoration: none;
}

.marca strong {
    color: #0891b2;
    font-weight: 700;
}

.marca-texto {
    line-height: 1.05;
    text-align: left;
}

.logo-marco {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    padding: 4px;
    background: linear-gradient(135deg, #0891b2 0%, #2563eb 60%, #22d3ee 100%);
    box-shadow: 0 6px 18px rgba(8, 145, 178, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
    background: #ffffff;
}

.eslogan {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}

.nav {
    background: #0f172a;
    border-radius: 8px;
    padding: 0 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.nav ul li a {
    display: block;
    padding: 12px 16px;
    color: #e2e8f0;
}

.nav ul li a:hover {
    color: #ffffff;
    background: #1e293b;
    text-decoration: none;
    border-radius: 8px;
}

.nav-usuario {
    color: #94a3b8;
    font-size: 13px;
    padding: 0 8px;
}

.contenido {
    flex: 1;
    padding: 24px 0;
}

.pie {
    border-top: 1px solid #e5e7eb;
    padding: 16px 0;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.pie a {
    color: #2563eb;
}

.pie-contacto {
    color: #4b5563;
    margin-bottom: 6px;
}

.pie-direccion {
    margin-bottom: 8px;
}

h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

h2 {
    font-size: 20px;
    margin: 22px 0 10px 0;
}

h3 {
    font-size: 17px;
}

.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0e7490 100%);
    color: #f1f5f9;
    border-radius: 12px;
    padding: 36px 28px;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: 30px;
    color: #ffffff;
    margin-bottom: 10px;
}

.hero p {
    color: #cbd5e1;
    max-width: 640px;
    margin-bottom: 16px;
}

.hero .boton {
    background: #22d3ee;
    color: #0f172a;
    font-weight: 600;
}

.hero .boton:hover {
    background: #67e8f9;
}

.seccion-titulo {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 12px 0;
}

.seccion-titulo h2 {
    margin: 0;
}

.seccion-titulo a {
    font-size: 14px;
}

.familia-rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.familia-tarjeta {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.15s ease;
}

.familia-tarjeta:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border-color: #0891b2;
}

.familia-tarjeta h3 {
    font-size: 16px;
    color: #0e7490;
}

.familia-tarjeta p {
    color: #6b7280;
    font-size: 13px;
    flex: 1;
}

.familia-tarjeta .cantidad {
    color: #0891b2;
    font-size: 12px;
    font-weight: 600;
}

.filtros {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.campo {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
}

.campo:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.filtros .campo {
    flex: 1;
    min-width: 160px;
}

textarea.campo {
    width: 100%;
    resize: vertical;
}

.cantidad-campo {
    width: 70px;
    text-align: center;
}

.boton {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

.boton:hover {
    background: #1d4ed8;
    text-decoration: none;
    color: #ffffff;
}

.boton-carrito {
    background: #0891b2;
}

.boton-carrito:hover {
    background: #0e7490;
}

.boton-secundario {
    background: #f3f4f6;
    color: #1f2937;
}

.boton-secundario:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.boton-peligro {
    background: #dc2626;
}

.boton-peligro:hover {
    background: #b91c1c;
}

.boton-pequeno {
    padding: 7px 14px;
    font-size: 13px;
}

.rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}

.tarjeta {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease;
}

.tarjeta:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.tarjeta-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    background: #eef0f2;
}

.tarjeta-cuerpo {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.tarjeta-categoria {
    align-self: flex-start;
    background: #ecfeff;
    color: #0e7490;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
}

.tarjeta-ref {
    color: #9ca3af;
    font-size: 12px;
    margin-top: 2px;
}

.tarjeta-desc {
    color: #6b7280;
    font-size: 13px;
    flex: 1;
}

.tarjeta-precio {
    font-size: 19px;
    font-weight: 700;
    color: #1f2937;
}

.precio-grande {
    font-size: 26px;
}

.tarjeta-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-stock {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
}

.badge-agotado {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.badge-destacado {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.aviso {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 12px 0;
}

.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.ok {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.pago-recibido {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.pago-recibido h3 {
    margin: 0 0 4px;
    color: #15803d;
}

.pago-mensaje {
    color: #166534;
    font-weight: 600;
    margin: 4px 0 10px;
}

.detalle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px;
}

.detalle-img-grande {
    width: 100%;
    border-radius: 8px;
    background: #eef0f2;
}

.detalle-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.detalle-desc {
    color: #374151;
    white-space: pre-line;
}

.detalle-meta {
    color: #6b7280;
    font-size: 13px;
}

.formulario {
    max-width: 560px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formulario label {
    font-weight: 600;
    font-size: 14px;
}

.formulario .campo {
    width: 100%;
}

.form-pie {
    color: #6b7280;
    font-size: 14px;
}

.encabezado-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.tabla th,
.tabla td {
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid #f0f1f3;
    font-size: 14px;
    vertical-align: middle;
}

.tabla th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.tabla tbody tr:last-child td {
    border-bottom: none;
}

.tabla tbody tr:hover {
    background: #f9fafb;
}

.tabla .min {
    width: 1%;
    white-space: nowrap;
}

.chk-ayuda {
    color: #6b7280;
    font-size: 13px;
}

.mini-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    background: #eef0f2;
}

.carrito-resumen {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 22px;
    margin-top: 16px;
}

.carrito-total {
    font-size: 22px;
    font-weight: 700;
    color: #0e7490;
    margin: 2px 0 0 0;
}

.carrito-total-linea {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    min-width: 260px;
    padding: 3px 0;
}

.contenido-texto {
    max-width: 780px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
}

.contenido-texto h2 {
    margin-top: 20px;
}

.contenido-texto p {
    margin-bottom: 12px;
}

.contenido-texto code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.impl-rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.impl-tarjeta {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.impl-tarjeta:hover {
    border-color: #0891b2;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.12);
}

.impl-tarjeta h3 {
    color: #0e7490;
    font-size: 16px;
}

.impl-tarjeta p {
    color: #6b7280;
    font-size: 13px;
    flex: 1;
}

.estado-nuevo {
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
}

.estado-atendido {
    background: #f0fdf4;
    color: #15803d;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
}

.estado-cancelado {
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
}

.paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 24px 0 8px;
}

.pagina {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

a.pagina:hover {
    border-color: #0891b2;
    color: #0891b2;
}

a.pagina.pagina-actual,
a.pagina.pagina-actual:hover {
    background: #0891b2;
    color: #ffffff;
    border-color: #0891b2;
    cursor: default;
}

.pagina-info {
    color: #64748b;
    font-size: 14px;
    margin-left: 8px;
}

.migas {
    margin-bottom: 14px;
    font-size: 13px;
    color: #64748b;
}

.migas a {
    color: #0891b2;
    text-decoration: none;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 14px 0 8px;
}

.galeria figure {
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.galeria img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.lista-docs {
    margin: 14px 0 8px;
    padding-left: 20px;
    line-height: 1.9;
}

.lista-docs a {
    color: #0891b2;
}

.archivos-rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.archivo-tarjeta {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.archivo-tarjeta img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
}

.archivo-tarjeta span {
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
}

.lista-archivos {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.lista-archivos li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 14px;
    word-break: break-all;
}

.formulario h2 {
    margin: 4px 0 12px 0;
}
