* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

.header {
    background: #111827;
    color: white;
    padding: 18px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}




.logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: white;
    border-radius: 16px;
    padding: 5px;
    display: block;
}

.logo h1 {
    margin: 0;
    font-size: 24px;
}

.logo p {
    margin: 0;
    font-size: 13px;
    color: #d1d5db;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 18px;
    font-weight: bold;
}

.categorias-bar {
    background: white;
    padding: 14px 8%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
}

.categorias-bar a {
    background: #e0ecff;
    color: #1d4ed8;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
}

.contenedor {
    padding: 28px 8%;
}

.hero {
    background: linear-gradient(120deg, #1e3a8a, #2563eb);
    color: white;
    padding: 45px;
    border-radius: 22px;
    margin-bottom: 30px;
}

.hero h2 {
    font-size: 34px;
    margin: 0 0 12px;
}

.titulo {
    margin-top: 20px;
    color: #111827;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}

.card {
    background: white;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
}

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

.card h3 {
    margin-bottom: 8px;
}

.stock {
    color: #047857;
    font-weight: bold;
}

.acciones {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn,
.btn-sec,
.btn-danger {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.btn {
    background: #2563eb;
    color: white;
}

.btn-sec {
    background: #e5e7eb;
    color: #111827;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.detalle {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 35px;
    background: white;
    padding: 30px;
    border-radius: 20px;
}

.detalle img {
    width: 100%;
    height: 350px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 16px;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 14px;
    overflow: hidden;
}

.tabla th,
.tabla td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.checkout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.formulario,
.resumen,
.card-exito {
    background: white;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.formulario label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

.formulario input,
.formulario textarea {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
}

.nota {
    background: #eff6ff;
    padding: 12px;
    border-left: 4px solid #2563eb;
}

.mensajes {
    padding: 12px 8%;
}

.mensaje {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    padding: 10px;
    margin-bottom: 8px;
}

.exito {
    text-align: center;
}

.footer {
    background: #111827;
    color: white;
    text-align: center;
    padding: 18px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .header,
    .checkout,
    .detalle {
        display: block;
    }

    nav {
        margin-top: 14px;
    }

    nav a {
        display: inline-block;
        margin: 8px 8px 0 0;
    }
}
