@import url('https://fonts.googleapis.com/css2?family=Condiment&family=Metamorphous&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Condiment&family=MedievalSharp&family=Metamorphous&display=swap');

:root {
    --white: #F8F5EB;
    --gold: #C6A44B;
    --wine: #83072D;
    --gray: #8F9CA4;
    --black: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'MedievalSharp', cursive;
    background-color: var(--white);
    color: var(--black);
}

/* ========== HEADER ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--white);
    border-bottom: 3px solid var(--wine);
}

.logo { display: flex; align-items: center; }
.logo img { height: 70px; width: auto; }

.nav-icons { display: flex; align-items: center; gap: 8px; }
.nav-icons img { width: 24px; height: 24px; cursor: pointer; transition: transform 0.2s ease; }
.nav-icons img:hover { transform: scale(1.1); }

.hamburger-container { position: relative; display: flex; flex-direction: column; align-items: flex-end; }
.hamburger { cursor: pointer; padding: 5px; margin-left: 5px; position: relative; z-index: 1001; }
.hamburger img { width: 28px; height: auto; }

.gold-line {
    position: absolute; top: 100%; right: 10px; width: 3px; height: 0;
    background-color: var(--gold); transition: height 0.3s ease; z-index: 1000;
}
.gold-line.active { height: 30px; }

.dropdown-menu {
    position: absolute; top: 80px; left: 0; width: 100%;
    background-color: var(--white); padding: 15px 20px;
    display: none; z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-top: 3px solid var(--gold);
}
.dropdown-menu.active { display: block; }
.dropdown-menu ul { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.dropdown-menu ul li a {
    color: var(--wine); text-decoration: none; font-family: 'Metamorphous', cursive;
    font-size: 14px; font-weight: 400; letter-spacing: 1px; transition: color 0.3s ease;
}
.dropdown-menu ul li a:hover { color: var(--gold); }

#dropdownMenu { display: none !important; }
#dropdownMenu.active { display: block !important; }

/* ========== SEARCH & LOGIN MODALS ========== */
.search-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8); z-index: 2000; display: none;
    justify-content: center; align-items: center;
}
.search-modal.active { display: flex; }

.search-container {
    background-color: var(--white); padding: 40px; border-radius: 5px;
    width: 90%; max-width: 500px; position: relative;
}
.search-container h3 { font-family: 'Metamorphous', cursive; color: var(--wine); margin-bottom: 20px; text-align: center; }
.search-container input {
    width: 100%; padding: 15px; border: 2px solid var(--wine);
    font-family: 'MedievalSharp', cursive; font-size: 16px; outline: none; background-color: var(--white);
}
.search-container input:focus { border-color: var(--gold); }

.search-close {
    position: absolute; top: 10px; right: 15px; background: none;
    border: none; font-size: 28px; color: var(--wine); cursor: pointer;
}

.search-results { max-height: 350px; overflow-y: auto; margin-top: 15px; }
.search-result-item {
    display: flex; align-items: center; gap: 15px; padding: 12px;
    border-bottom: 1px solid rgba(131,7,45,0.15); cursor: pointer;
    text-decoration: none; color: var(--black); transition: background-color 0.2s ease;
}
.search-result-item:hover { background-color: rgba(198,164,75,0.1); }
.search-result-img { width: 50px; height: 50px; object-fit: contain; flex-shrink: 0; }
.search-result-info { flex: 1; }
.search-result-name { font-family: 'Metamorphous', cursive; font-size: 14px; color: var(--wine); }
.search-result-cat { font-family: 'MedievalSharp', cursive; font-size: 12px; color: var(--gray); text-transform: capitalize; }
.search-result-price { font-family: 'Metamorphous', cursive; font-size: 16px; color: var(--wine); font-weight: bold; }
.search-no-results { text-align: center; padding: 30px 10px; color: var(--gray); font-family: 'MedievalSharp', cursive; }

/* Login */
.login-container input {
    width: 100%; padding: 15px; border: 2px solid var(--wine);
    font-family: 'MedievalSharp', cursive; font-size: 16px; outline: none;
    background-color: var(--white); margin-bottom: 12px;
}
.login-container input:focus { border-color: var(--gold); }
.login-btn {
    width: 100%; padding: 12px; background-color: var(--wine); color: var(--white);
    border: none; font-family: 'Metamorphous', cursive; font-size: 14px;
    cursor: pointer; letter-spacing: 2px; transition: background-color 0.3s ease;
}
.login-btn:hover { background-color: #6a0625; }
.logout-btn { background-color: transparent; color: var(--wine); border: 2px solid var(--wine); margin-top: 15px; }
.logout-btn:hover { background-color: var(--wine); color: var(--white); }
.login-error { color: #cc0000; font-family: 'MedievalSharp', cursive; font-size: 13px; text-align: center; margin-top: 10px; }
.user-welcome { text-align: center; padding: 20px 0; }
.user-avatar { width: 60px; height: 60px; color: var(--wine); margin-bottom: 10px; }
.user-welcome p { font-family: 'MedievalSharp', cursive; font-size: 16px; }
.user-logged { position: relative; }
.user-logged::after {
    content: ''; position: absolute; bottom: -2px; right: -2px;
    width: 8px; height: 8px; background-color: #2d8a4e; border-radius: 50%; border: 1.5px solid var(--white);
}

/* ========== PAGE CONTENT ========== */
.page-hero {
    background-color: var(--wine);
    color: var(--white);
    padding: 30px 20px;
    text-align: center;
    margin-top: 90px;
}

.page-hero h1 {
    font-family: 'Metamorphous', cursive;
    font-size: 24px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.page-content {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    min-height: 50vh;
}

.page-content h2 {
    font-family: 'Metamorphous', cursive;
    color: var(--wine);
    font-size: 20px;
    margin-bottom: 15px;
    margin-top: 30px;
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content p {
    font-family: 'MedievalSharp', cursive;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
}

.page-content ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 15px;
}

.page-content ul li {
    font-family: 'MedievalSharp', cursive;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 5px;
}

/* ========== CONTACT FORM ========== */
.contact-form {
    max-width: 600px;
    margin: 30px auto 0;
}

.contact-form label {
    font-family: 'Metamorphous', cursive;
    font-size: 14px;
    color: var(--wine);
    display: block;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--wine);
    font-family: 'MedievalSharp', cursive;
    font-size: 15px;
    outline: none;
    background-color: var(--white);
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--gold);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: var(--wine);
    color: var(--white);
    border: none;
    font-family: 'Metamorphous', cursive;
    font-size: 14px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #6a0625;
}

.contact-msg {
    font-family: 'MedievalSharp', cursive;
    font-size: 14px;
    text-align: center;
    margin-top: 15px;
    min-height: 20px;
}

/* ========== BLOG STYLES ========== */
.blog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.blog-card {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    border: 2px solid var(--wine);
    padding: 0;
    transition: box-shadow 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 4px 15px rgba(131,7,45,0.2);
}

.blog-card-header {
    background-color: var(--wine);
    color: var(--white);
    padding: 15px 20px;
}

.blog-card-header h3 {
    font-family: 'Metamorphous', cursive;
    font-size: 16px;
    letter-spacing: 1px;
}

.blog-card-header .blog-date {
    font-family: 'MedievalSharp', cursive;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
}

.blog-card-body {
    padding: 20px;
}

.blog-card-body p {
    font-family: 'MedievalSharp', cursive;
    font-size: 14px;
    line-height: 1.6;
    color: var(--black);
    text-align: left;
}

.blog-coming-soon {
    text-align: center;
    padding: 60px 20px;
}

.blog-coming-soon p {
    font-family: 'MedievalSharp', cursive;
    font-size: 18px;
    color: var(--gray);
    text-align: center;
}

/* ========== FOOTER ========== */
/* ========== FOOTER ========== */
footer {
    background-color: var(--wine, #83072D); /* Fuerza el fondo rojo entero */
    position: relative;
    margin-top: 80px; 
}

/* El castillo asomando arriba a la derecha */
.footer-castle {
    position: absolute;
    top: -55px; /* Ajusta este valor para subir o bajar el castillo */
    right: 5%;
}

.footer-castle img {
    height: 60px;
    width: auto;
}

/* Contenedor principal: ESTO FUERZA LA LÍNEA HORIZONTAL */
.footer-main-row {
    display: flex;
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center; /* Los centra todos a la misma altura */
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    gap: 20px;
}

/* 1. Logo */
.footer-logo img {
    height: 110px; /* Tamaño similar al de tu cap2 */
    width: auto;
}

/* 2 y 3. Columnas de texto */
.footer-col h4 {
    font-family: 'Metamorphous', cursive;
    color: var(--white, #F8F5EB);
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.footer-col ul li {
    margin-bottom: 5px;
}

.footer-col ul li a {
    color: var(--white, #F8F5EB);
    text-decoration: none;
    font-family: 'MedievalSharp', cursive;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: var(--gold, #C6A44B);
    text-decoration: underline;
}

/* 4. Newsletter */
.footer-newsletter {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-newsletter img {
    height: 65px;
    width: auto;
}

.footer-newsletter-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-newsletter-text h4 {
    font-family: 'Metamorphous', cursive;
    color: var(--white, #F8F5EB);
    font-size: 20px;
    margin: 0;
    letter-spacing: 1px;
}

.btn-suscribete {
    background-color: var(--white, #F8F5EB);
    color: var(--wine, #83072D);
    padding: 6px 22px;
    border-radius: 20px; /* Bordes ovalados como una píldora */
    text-decoration: none;
    font-family: 'MedievalSharp', cursive;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-suscribete:hover {
    background-color: var(--gold, #C6A44B);
    color: var(--white, #F8F5EB);
}

/* 5. Redes */
.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-socials a svg {
    width: 32px;
    height: 32px;
    fill: var(--white, #F8F5EB); /* Sin fondos cuadrados, iconos limpios y blancos */
    transition: transform 0.2s;
}

.footer-socials a:hover svg {
    transform: scale(1.15);
}

/* Copyright abajo */
.footer-bottom {
    background-color: rgba(0, 0, 0, 0.15); /* Franja oscura sutil */
    color: var(--white, #F8F5EB);
    text-align: center;
    padding: 10px;
    font-family: 'MedievalSharp', cursive;
    font-size: 12px;
}

/* Responsive: Solo se apila en pantallas pequeñas (tablets o móviles) */

/*========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .footer-main-row {
        flex-wrap: wrap;
        justify-content: center;
    }
}
@media (max-width: 768px) {
    .footer-main-row {
        flex-direction: column;
        gap: 35px;
    }
    .footer-castle {
        top: -45px;
    }
}
@media (max-width: 768px) {
    .dropdown-menu { top: 70px; }
    .dropdown-menu ul { gap: 10px; }
    .dropdown-menu ul li a { font-size: 12px; }
    .gold-line.active { height: 20px; }
    .blog-grid { flex-direction: column; }
    .blog-card { max-width: 100%; }
}

@media (min-width: 769px) {
    .top-header { padding: 15px 40px; }
    .logo img { height: 80px; }
    .nav-icons img { width: 28px; height: 28px; }
    .dropdown-menu { top: 110px; }
    .dropdown-menu ul { gap: 40px; }
    .dropdown-menu ul li a { font-size: 16px; }
    .footer-links-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    .footer-top { padding: 35px 40px; }
    .footer-top-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 40px;
    }
    .social-icons a { width: 45px; height: 45px; }
    .social-icons a svg { width: 32px; height: 32px; }
    .page-hero h1 { font-size: 30px; }
    .page-hero { margin-top: 110px; }
    .page-content { padding: 50px 40px; }
}
