/* -------------------- */
/*   ESTILOS GENERALES   */
/* -------------------- */
body {
    margin: 0;
    font-family: "Poppins", Arial, sans-serif;
    background: #f1f2f6;
    color: #2f3640;
}

/* -------------------- */
/*       HEADER          */
/* -------------------- */
header {
    background: linear-gradient(135deg, #2f3640, #353b48);
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.header-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    background-color: white;
    color: #2f3640;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    border: none;
}

.btn:hover {
    background-color: #dcdde1;
    transform: translateY(-2px);
}

/* -------------------- */
/*        MAIN           */
/* -------------------- */
main {
    padding: 40px 20px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}

/* -------------------- */
/*     TARJETAS          */
/* -------------------- */
.productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    padding: 20px 30px;
}

.card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.placeholder {
    background: #dcdde1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
}

.card h3 {
    font-size: 1.3rem;
    margin: 10px 0 5px;
}

.card p {
    margin: 5px 0;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #273c75;
}

/* Botón Comprar */
.card button {
    margin-top: 12px;
    padding: 10px 20px;
    border: none;
    background: #273c75;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.card button:hover {
    background: #192a56;
}

/* -------------------- */
/*        MODAL          */
/* -------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 420px;
    padding: 25px;
    border-radius: 12px;
    animation: aparecer .25s ease-out;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.modal-header button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.modal-header button:first-child {
    background: #7f8fa6;
    color: white;
}

.modal-header button:last-child {
    background: #273c75;
    color: white;
}

.modal-header button:hover {
    opacity: 0.9;
}

.modal-content label {
    font-weight: 600;
    margin-top: 12px;
}

.modal-content input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 5px;
}

/* Animación */
@keyframes aparecer {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}


.btn-login {
    display: inline-block;
    background-color: #ff4d4d;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-login:hover {
    background-color: #e60000;
    transform: scale(1.05);
}