/* PAGINA DE EXPLORAR Y PRINCIPAL DE LA QUE SE NUTREN TODAS LA DEMAS  */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #e9e3d8;
}

/* FLEX */
body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    
}



/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 35px 80px;
    background: #e9e3d8;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* LOGO */
.logo-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.logo-text {
    font-weight: 600;
    font-size: 28px;
    color: #1b0e09;
}

/* NAV MÁS GRANDE */
nav a {
    margin-left: 40px;
    text-decoration: none;
    color: #333;
    position: relative;
    font-weight: 600;
    font-size: 18px;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2e0d02;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: #5c3528fd;
}

/* HERO PRO */

.hero {
    background: linear-gradient(135deg, #4a2518, #7a4a39);
    color: #e9e3d8;
    text-align: center;

    width: 100%;
    padding: 35px 0;
    margin: 0;
}

.hero h1 {
    font-size: 26px;
    margin-bottom: 5px;
    
}

.hero p {
    font-size: 14px;
}

/* BUSCADOR MODERNO */
.search-container {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
}

.search {
    width: 600px;
    padding: 16px 20px;
    border-radius: 30px;
    border: none;
    background: #f5f1e6;
    font-size: 16px;
    color: #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search::placeholder {
    color: #999;
}

.search:focus {
    outline: none;
    background: white;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* FILTROS MODERNOS */
.filtros {
    padding: 20px 80px;
    display: flex;
    gap: 15px;
}

select {
    padding: 12px 18px;
    border-radius: 25px;
    border: none;
    background: #f5f1e6;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    appearance: none;

    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

select:hover {
    background: white;
}

select:focus {
    outline: none;
    box-shadow: 0 5px 12px rgba(0,0,0,0.2);
}

/* GRID */
.grid-libros {
    display: flex;
    gap: 20px;
    padding: 20px 80px;
}

/* CARD */
.card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    width: 180px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.card form {
    margin-top: auto; /* 🔥 empuja el botón abajo */
}

/* IMAGEN */
.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 5px;
}

/* TEXTO */
.card h3 {
    margin: 10px 0 5px;
}

.card p {
    font-size: 14px;
    color: gray;
}

/* BOTÓN */
.card button {
    width: 100%;
    padding: 8px;
    background: #583427;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: auto;
    cursor: pointer;
}

.card button:hover {
    background: #4a2518;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.detalle-libro {
    display: flex;
    gap: 40px;
    padding: 40px;
    align-items: center;
}

.detalle-img {
    width: 300px;
    border-radius: 12px;
}

.detalle-info {
    max-width: 500px;
}

.btn-contacto {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #6b3f2a;
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

/* FOOTER */
.footer {
    background: #1d110d;
    color: #f5f1e6;
    padding: 40px 80px 20px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 20px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 10px;
}

.footer-section a {
    text-decoration: none;
    color: #f5f1e6;
    margin-bottom: 5px;
    font-size: 14px;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
    font-size: 14px;
}

/* SLIDER SECTION */
.slider-section {
    padding: 40px 80px;
    text-align: center;
}

.slider-section h2 {
    margin-bottom: 20px;
}

/* CONTENEDOR */
.slider-container {
    position: relative;
    display: flex;
    align-items: center;
}























/* PAGINA DE INICIO */
.about {
    padding: 40px 80px;
    text-align: center;
}

.about h2 {
    margin-bottom: 15px;
}

.about p {
    max-width: 700px;
    margin: auto;
    color: #444;
}





/* SLIDER SECTION */
.slider-section {
    padding: 50px 80px;
    text-align: center;
}

.slider-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CONTENEDOR */
.slider-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}







/* SLIDER NOVEDADES*/
.slider {
    display: flex;
    overflow: hidden;
    width: 320px; /* MÁS GRANDE */
    border-radius: 15px;
}

.slider .card {
    min-width: 320px;
    max-width: 320px;
    height: 420px;

    border-radius: 15px; /* REDONDEO COMPLETO */
    overflow: hidden; /* 🔥 CLAVE: corta bien el contenido */

    background: white;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slider .card img {
    width: 220px;
    height: 280px;
    object-fit: cover;

    border-radius: 10px; /* opcional para suavizar dentro */
}

.slider .card h3 {
    margin-top: 15px;
    text-align: center;
}

/* BOTONES */
.slider-btn {
    background: #583427;
    color: white;
    border: none;
    font-size: 18px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 50%;
    position: absolute;
    z-index: 10;
}

/* MÁS PEGADAS */
.slider-btn.left {
    left: calc(50% - 180px);
}

.slider-btn.right {
    right: calc(50% - 180px);
}






/* TARJETAS DE JUSTO ABAJO NOVEDADES */
.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 120px 80px;
}

.feature-card {
    background: #f5f1e6;
    padding: 20px;
    border-radius: 10px;
    width: 250px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* CTA */
.cta {
    background: linear-gradient(135deg, #4a2518, #7a4a39);
    color: #f5f1e6;
    text-align: center;
    padding: 40px;
}

.cta button {
    margin-top: 15px;
    padding: 10px 20px;
    border: none;
    background: #f5f1e6;
    color: #583427;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

.cta button:hover {
    background: #f5f1e6;
}


.grid-libros {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}











/* LOGIN SECTION */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

/* CAJA */
.login-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 350px;

    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* TABS */
.login-tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.login-tabs button {
    flex: 1;
    padding: 10px;
    border: none;
    background: #f5f1e6;
    cursor: pointer;
    font-weight: 500;
}

.login-tabs button:hover {
    background: #e9e3d8;
}

/* FORM */
.formulario {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.formulario input {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.formulario button {
    margin-top: 10px;
    padding: 10px;
    background: #583427;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.formulario button:hover {
    background: #4a2518;
}

/* OCULTO */
.oculto {
    display: none;
}














/* PUBLICAR */
.publicar-section {
    display: flex;
    justify-content: center;
    padding: 50px;
}

.publicar-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 400px;

    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.form-publicar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-publicar input,
.form-publicar textarea,
.form-publicar select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.form-publicar button {
    padding: 12px;
    background: #583427;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.form-publicar button:hover {
    background: #4a2518;
}





.contenedor {
    padding: 40px 80px;
}

.contenedor h2 {
    margin-bottom: 20px;
}



/* ================= CHAT APP ================= */

.chat-container {
    display: flex;
    height: calc(100vh - 60px); /* ajusta según altura del header */
}

/* IZQUIERDA */
.chat-libro {
    width: 30%;
    background: white;
    padding: 20px;
    padding-left: 50px;
    padding-right: 50px;
    border-right: 2px solid #ddd;

    display: flex;
    flex-direction: column;
    align-items: center; /* centra contenido */
}

/* 🔥 IMAGEN PEQUEÑA Y CONTROLADA */
.chat-libro img {
    width: 150px;      /* tamaño fijo */
    height: 520px;     /* proporción tipo libro */
    object-fit: cover; /* recorte bonito */
    border-radius: 10px;
    
}

/* DERECHA */
.chat-mensajes {
    width: 70%;
    display: flex;
    flex-direction: column;
    background: #f5f1e6;
}

/* MENSAJES */
.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* BURBUJAS */
.mensaje {
    max-width: 60%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
}

/* OTRO */
.mensaje.otro {
    background: #e0e0e0;
    align-self: flex-start;
}

/* TU */
.mensaje.tuyo {
    background: #bde5b8;
    align-self: flex-end;
}

/* INPUT */
.chat-form {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #ccc;
}

.chat-form input {
    flex: 1;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #ccc;
}

.chat-form button {
    margin-left: 10px;
    padding: 10px 20px;
    border: none;
    background: #583427;
    color: white;
    border-radius: 20px;
}



/* 🔥 HEADER CHAT */
.chat-header {
    display: flex;
    align-items: center;
    gap: 20px;

    background: #4a2518;
    color: #fff;

    padding: 15px 20px;

    position: sticky;
    top: 0;
    z-index: 1000;
}

/* BOTÓN VOLVER */
.btn-volver {
    background: white;
    color: #4a2518;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-volver:hover {
    background: #e9e3d8;
}

/* TEXTO */
.chat-titulo {
    font-weight: 600;
    font-size: 18px;
}

.mensaje.otro.nuevo {
    background: #dbeafe;
}




/* FORMULARIO MENSAJE */

.mensaje-form{
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
}

.mensaje-form textarea{
    resize: none;
    min-height: 110px;
    padding: 15px;
    border: 1px solid #d1c7bd;
    border-radius: 12px;
    background: #f8f5f1;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.mensaje-form textarea:focus{
    border-color: #7a4a2c;
    background: white;
    box-shadow: 0 0 0 3px rgba(122,74,44,0.15);
}

.btn-mensaje{
    background: linear-gradient(135deg, #7a4a2c, #9b5e38);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
    width: fit-content;
}

.btn-mensaje:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.btn-mensaje:active{
    transform: scale(0.98);
}