/* ================================
ESTILOS GENERALES
================================= */

* {
  box-sizing: border-box;
  }

body {
background-color: #f0f8ff;
color: #000;
margin: 0;
padding: 0;
}

h1, h2 {
color: #007bff;
margin: 20px 0;
text-align: center;
}

/* ================================
GRID DE PRODUCTOS
================================= */
.productos-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 25px;
width: 95%;
max-width: 1200px;
margin: 30px auto;
}

.producto-card {
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
padding: 15px;
text-align: center;
transition: transform 0.2s, box-shadow 0.2s;
}

.producto-card:hover {
transform: translateY(-5px);
box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.producto-card img {
width: 100%;
height: 150px;
object-fit: cover;
border-radius: 8px;
margin-bottom: 10px;
}

.producto-card h3 {
margin: 10px 0;
font-size: 1.1em;
}

.producto-card p.precio {
font-weight: bold;
color: #007bff;
margin: 5px 0 15px 0;
}

/* ================================
BOTONES GENERALES
================================= */
.btn, .button, .pagar-btn, .eliminar-btn, .volver-tienda {
display: inline-block;
padding: 10px 20px;
border-radius: 8px;
font-weight: bold;
cursor: pointer;
text-decoration: none;
transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.btn-primary {
background-color: #007bff;
color: #fff;
}

.btn-primary:hover {
background-color: #0056b3;
transform: translateY(-3px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-success, .pagar-btn {
background-color: #28a745;
color: #fff;
}

.btn-success:hover, .pagar-btn:hover {
background-color: #218838;
transform: translateY(-3px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-danger, .eliminar-btn {
background-color: #cd0707;
color: #fff;
}

.btn-danger:hover, .eliminar-btn:hover {
background-color: #b00404b8;
transform: translateY(-3px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.volver-tienda {
background-color: #007bff;
color: #fff;
}

.volver-tienda:hover {
background-color: #0056b3;
transform: translateY(-2px);
}

/* ================================
BOTONES DE SELECCIÓN DE FUENTE
================================ */
.boton-fuente {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    background-color: #6c757d; /* gris neutro */
    transition: background 0.3s, transform 0.2s;
}

.boton-fuente:hover {
    background-color: #5a6268; /* gris más oscuro al pasar el mouse */
    transform: translateY(-2px);
}
/* Contenedor de selección de fuente */
.seleccion-fuente-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Mueve todo hacia la derecha */
    margin-left: auto;     /* opcional si quieres empujarlo aún más */
    margin-top: 5px;
}

.titulo-fuente {
    font-weight: bold;
    color: #333;
    font-size: 0.95em;
    display: block;      /* que esté en su propia línea */
    margin-left: 5px;    /* mover ligeramente a la izquierda */
    margin-bottom: 4px;  /* espacio pequeño entre texto y botones */
}


/* ================================
BARRA SUPERIOR
================================= */
.barra-superior {
    width: 100%;
    background-color: #f8f9fa;
    color: #333;
    padding: 12px 80px;
    display: flex;
    justify-content: space-between; /* izquierda ↔ derecha */
    align-items: center;
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
}

/* Enlaces convertidos en botones */
.barra-superior a {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.2s;
    color: #fff;
}

/* Botón azul (Inicio) */
.barra-superior a:first-child {
    background-color: #007bff;
}

.barra-superior a:first-child:hover {
    background-color: #0056b3;
}

/* Botón rojo (Cerrar sesión) */
.barra-superior a.cerrar-sesion {
    background-color: #dc3545;
}

.barra-superior a.cerrar-sesion:hover {
    background-color: #b02a37;
}

/* ================================
CARRITO
================================= */
.carrito-container {
width: 95%;
max-width: 1200px;
margin: 30px auto;
padding: 20px;
background-color: #fff;
border: 2px solid #007bff;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,123,255,0.1);
}

.carrito-container h1 {
color: #007bff;
text-align: center;
margin-bottom: 25px;
}

.carrito-container table {
width: 100%;
border-collapse: collapse;
}

.carrito-container table th,
.carrito-container table td {
border: 1px solid #007bff;
padding: 12px;
text-align: center;
vertical-align: middle;
}

.carrito-container table th {
background-color: #007bff;
color: #fff;
font-weight: bold;
}

.carrito-container table td img {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 5px;
margin-bottom: 5px;
}

/* Botones de cantidad y acciones */
.carrito-container table td form button {
background-color: #007bff;
color: #fff;
border: none;
padding: 5px 10px;
border-radius: 6px;
font-weight: bold;
cursor: pointer;
transition: background 0.2s, transform 0.2s;
}

.carrito-container table td form button:hover {
background-color: #0056b3;
transform: translateY(-2px);
}

.total-row td {
font-size: 1.2em;
font-weight: bold;
text-align: right;
background-color: #e6f0ff;
color: #007bff;
}

.carrito-vacio {
font-size: 1.2em;
color: #007bff;
margin-top: 40px;
text-align: center;
}

.acciones-carrito {
text-align: center;
margin-top: 20px;
}

/* ================================
PAGAR.PHP - CONFIRMACIÓN DE PAGO
================================= */
.confirmacion-container {
width: 90%;
max-width: 600px;
margin: 50px auto;
background-color: #fff;
padding: 25px 30px;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
text-align: center;
font-family: inherit;
}

.confirmacion-container h1 {
color: #007bff;
margin-bottom: 20px;
}

.confirmacion-container p {
font-size: 1.1em;
color: #333;
margin-bottom: 25px;
}

/* Botón volver a tienda */
.confirmacion-container .volver-btn {
display: inline-block;
padding: 10px 20px;
border-radius: 6px;
background-color: #007bff;
color: #fff;
font-weight: bold;
text-decoration: none;
transition: background 0.2s, transform 0.2s;
}

.confirmacion-container .volver-btn:hover {
background-color: #0056b3;
transform: translateY(-2px);
}

/* ================================
CONTACTO
================================= */
.contacto, .contenido {
width: 90%;
max-width: 800px;
margin: 40px auto;
background-color: #fff;
padding: 25px 30px;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
font-family: inherit;
}

.contacto p, .contenido p {
font-size: 1em;
color: #333333;
margin-bottom: 15px;
}

.contacto p strong, .contenido strong {
color: #007bff;
}

.contacto form {
display: flex;
flex-direction: column;
gap: 15px;
}

.contacto form label {
font-weight: bold;
margin-bottom: 5px;
color: #007bff;
}

.contacto form input,
.contacto form textarea {
padding: 10px 12px;
border: 1px solid #007bff;
border-radius: 6px;
font-size: 1em;
outline: none;
box-shadow: 0 0 6px rgba(0,123,255,0.3);
transition: all 0.3s;
}

.contacto form button {
background-color: #0056b3;
color: #fff;
font-weight: bold;
border: none;
padding: 12px 20px;
border-radius: 6px;
cursor: pointer;
transition: background 0.2s, transform 0.2s;
transform: translateY(-2px);
}

.contenido h3 {
color: #007bff;
margin-top: 20px;
margin-bottom: 10px;
}

.contenido {
line-height: 1.6;
}

/* ================================
FOOTER
================================= */
footer {
background: #fff;
color: #007bff;
text-align: center;
padding: 20px 0;
border-top: 2px solid #007bff;
margin-top: 40px;
}

footer a {
color: #007bff;
text-decoration: none;
margin: 0 10px;
}

footer a:hover {
color: #0056b3;
}

/* ================================
RESPONSIVE
================================= */
@media (max-width: 768px) {
.barra-superior {
flex-direction: column;
align-items: flex-start;
padding: 10px 20px;
gap: 8px;
}

.barra-superior nav {
width: 100%;
justify-content: flex-start;
gap: 8px;
}

.productos-container {
gap: 15px;
}

.btn {
width: 100%;
text-align: center;
padding: 10px 0;
}

.carrito-container table th,
.carrito-container table td {
font-size: 0.9em;
padding: 8px;
}

.carrito-container table td img {
width: 50px;
height: 50px;
}

.carrito-container table td form button,
.acciones-carrito a {
padding: 8px 15px;
font-size: 0.9em;
}

.contenido, .contacto {
width: 95%;
padding: 20px;
}
}




/*aaaaa*/


#mensaje {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
}

#mensaje.error { background: #ffdddd; color: #a10000; }
#mensaje.success { background: #ddffdd; color: #006600; }
#mensaje.info { background: #ddeaff; color: #0040a1; }


