
/* 1. Estilos Globales y Tipografía */

:root {
    /* Paleta de colores generales */
    --color-primary: #343a40;      
    --color-secondary: #007bff;    
    --color-accent: #ffc107;       
    --color-background: #f8f9fa;   
    --color-card-bg: #ffffff;      
    --color-text: #333333;         
    --color-light-text: #6c757d;   
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2 {
    margin-bottom: 20px;
}

/* 2. Navbar (Barra de Navegación)*/

.navbar {
    background-color: var(--color-primary);
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
    font-weight: 700;
    font-size: 1.5em;
    color: var(--color-accent);
}

.navbar div a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: background-color 0.3s;
    border-radius: 4px;
}

.navbar div a:hover {
    background-color: #575757;
    text-decoration: none;
}

/* 3. Estilos de la Vista HOME */

.hero {
    background-color: #e9ecef;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--color-accent);
}

.hero h1 {
    color: var(--color-primary);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background-color: var(--color-card-bg);
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
	text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card img {
    height: 150px;
	width: 100%;
    object-fit: contain;
	display: block;
}

.card-body {
    padding: 15px;
}

.card-title {
    font-size: 1.3em;
    margin-top: 0;
    color: var(--color-secondary);
}

.card-text {
    font-size: 0.9em;
    color: var(--color-light-text);
    margin-bottom: 10px;
}

/* 4. Estilos de las Vistas NUEVAS PUBLICACIONES y TENDENCIAS */

.post {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background-color: var(--color-card-bg);
    border: 1px solid #ccc;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.post_image img {
    width: 180px;
    height: auto;
    border-radius: 5px;
    object-fit: cover;
}
.post_content {
    flex: 1;
}
.post h2 {
    color: var(--color-secondary);
    margin-bottom: 5px;
}

.post .meta {
    font-size: 0.85em;
    color: var(--color-light-text);
    margin-bottom: 15px;
    display: block;
}

/* Estilos específicos para TENDENCIAS */
.trend-item {
    background-color: var(--color-card-bg);
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.trend-item:hover {
    background-color: #f4f4f4;
}

.trend-item:last-child {
    border-bottom: none;
}

.rank {
    font-size: 2.5em;
    font-weight: 900;
    color: var(--color-accent);
    margin-right: 25px;
    min-width: 50px;
    text-align: center;
}

.info {
    flex-grow: 1;
}

.info h3 {
    margin: 0 0 5px 0;
    color: var(--color-text);
}

.info p {
    margin: 0;
    font-size: 0.9em;
    color: var(--color-light-text);
}

/* 5. Estilos de la Vista INICIO DE SESIÓN */

.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: var(--color-card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.login-container h1 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-text);
}

.form-group input[type="email"], 
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--color-accent);
    color: var(--color-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
}

.btn-primary:hover { 
    background-color: #ffda6a; 
}

.register-link { 
    text-align: center; 
    margin-top: 20px; 
    font-size: 0.95em; 
}

.review-header {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.review-header img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 20px;
}
.rating {
    font-size: 1.5em;
    color: var(--color-accent);
    margin-bottom: 10px;
}

/* 6. Estilos de la Vista DETALLE_PRODUCTO */

.review-body {
    background-color: #fcfcfc;
    padding: 20px;
    border-left: 5px solid var(--color-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}
.comments-section h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.comment {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    background-color: #fff;
}
.comment-meta {
    font-size: 0.8em;
    color: var(--color-light-text);
    margin-bottom: 5px;
}
.comment-meta strong {
    color: var(--color-primary);
}

/* Estilos para el Newsletter */
.newsLetter {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-top: 2px solid #eee;
    margin-top: 40px;
    border-radius: 8px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.newsLetter h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: #222;
}
.newsLetter p {
    margin-bottom: 20px;
    color: #555;
}
.newsLetter_form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.newsLetter_form input {
    padding: 12px;
    width: 250px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
}
.newsLetter_form input:focus {
    border-color: #ffb400;
}
.newsLetter_form button {
    padding: 12px 20px;
    background-color: #ffb400;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.newsLetter_form button:hover {
    background-color: #e6a200;
}

/*Estilos para el apartado Pie de Pagina */
.footer {
    background-color: #2c2c2c;
    color: #ddd;
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

.footer h3, 
.footer h4 {
    margin-bottom: 10px;
    color: #ffb400;
}

.footer_links ul {
    list-style: none;
    padding: 0;
}

.footer_links ul li {
    margin-bottom: 6px;
}

.footer_links a,
.footer_social a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer_links a:hover,
.footer_social a:hover {
    color: #ffb400;
}

.footer_social a {
    margin-right: 12px;
}

.footer_bottom {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #444;
    padding-top: 10px;
    font-size: 0.9rem;
    color: #aaa;
}
.about_us {
    background-color: #ffffff;
    padding: 50px 20px;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    max-width: 900px;
}

.about_us h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.about_us p {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1rem;
}


@media (max-width: 768px){
    .post{
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .post_image img{
        width: 100%;
        max-width: 300px;
        margin: 0 auto 15px;
    }
}