*{
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

.marseg_head{
    max-width: 100%;
    background-color: #ffff;
    display: flex;
    align-items: center;
    align-items: center;
}

.marseg_head img{
    width: 8%;
    height: auto;
    max-width: 100px;
    margin: 1%;
}

@media (max-width: 768px) {
    .marseg_head img {
        width: 20%; /* En celular necesita ocupar más porcentaje para verse */
        max-width: 80px; /* Pero limitamos su tamaño máximo para que no choque con el texto */
    }
}

.marseg_head h1{
    font-family: 'Times New Roman', Times, serif;
    font-size: 2.5vw;
    color: #330006;
    text-align: center;
    margin: 1%;
}


/*Contenedor del banner*/
.marseg-banner {
    width: 1000%;
    max-width: 100%;
    margin: auto; 
    display: flex;
    justify-content: center;
    position: relative;
}

/*Imagen del banner*/
.marseg-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/*Efecto del difuminado*/
.marseg-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}


.marseg_head nav{
    width: 60%;
    display: flex;
    margin: 1% auto;
}

.marseg_head a{
    font-family: 'Times New Roman', Times, serif;
    font-size: 1vw;
    color: #330006;
    text-decoration: none;
    text-align: center;
    padding: 1%;
    width: 100%;
}

.marseg-nov{
    max-width: 100%;
    margin: 4%;
}

.marseg-nov h2{
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 4vw;
    text-align: center;
    color: #330006;
    letter-spacing: 2px;
}

.marseg-nov p{
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.2vw;
    text-align: center;
    color: #9c0012;
    letter-spacing: 1px;
}

.marseg-container{
    max-width: 90%;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    padding-bottom: 20px;
    
}

.marseg-galeria{
    background-color: white;
    border: 1px solid #eee;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(74, 74, 74, 0.15);
    border-radius: 15px;
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 450px;
    width: 100%;
    box-sizing: border-box;
}

.marseg-galeria img{
    width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
}

.marseg-desc {
    padding: 0 10px;
    text-align: left;
    margin-bottom: 15px;
}

.marseg-desc p {
    margin: 8px 0;
    line-height: 1.4;
}

#precio{
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: #DC3545;
    font-weight: bold;
    font-size: 1.2em;
    margin-top: 5px;
    display: block;
}

#btnagregar{
    background-color: #e9ebf1;
    color: black;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%; /* Para que ocupe todo el ancho de la tarjeta */
    margin-top: auto;
}

#btnagregar:hover {
    background-color: #8a7272;
    color: #330006;
    transition: ease-in 0.1s;
}

/* ===== MENÚ PRINCIPAL ===== */

.menu{
    width: 70%;
    background-color: #ffff;
    border-radius: 10%;
}

.menu ul li{
    list-style: none;
}

/* Cada item del menú */
.menu ul li{
    position: relative;   /* necesario para el dropdown */
}

/* Links principales */
.menu ul li a{
    display: block;
    padding: 18px 25px;
    color: #330006;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
  
}

/* Hover del menú principal */
.menu ul li a:hover{
    background-color: #e7edff;
}

/* ===== SUBMENÚ (DROPDOWN) ===== */

.submenu{
    display: none;            /* oculto por defecto */
    position: absolute;       /* flotante */
    top: 100%;                /* justo debajo */
    left: 0;
    min-width: 250px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    padding: 10px 0;
    z-index: 9999;            /* para que quede encima */
}

/* Items del submenu */
.submenu li{
    width: 100%;
}

/* Links del submenu */
.submenu li a{
    display: block;
    padding: 12px 20px;
    color: #330006;
    font-weight: normal;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: #ffff;
}

/* Hover submenu */
.submenu li a:hover{
    background-color: #330006;
    padding-left: 25px;
}

/* Mostrar submenu al pasar mouse */
.dropdown:hover .submenu{
    display: list-item;
}

.pie {
    width: 100%;
    height: auto; /* Cambia height fijo por auto y usa padding */
    padding: 30px 0; 
    background: #330006;
    margin-top: 0; /* Obligatorio para quitar el espacio blanco */
    color: white;
}

.pie p{
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.2vw;
    color:#ffff;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Ocultamos el cuadro por defecto */
.dropdown-cuenta {
    display: none; 
    position: absolute;
    top: 100%; /* Aparece justo abajo del icono */
    right: 0;
    background-color: white;
    min-width: 150px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    padding: 10px;
    z-index: 100;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Mostramos el cuadro cuando el mouse pasa por encima del contenedor */
.usuario-menu-wrapper:hover .dropdown-cuenta {
    display: block;
}

.btn-cerrar {
    display: block;
    color: white;
    background-color: #d32f2f; /* Rojo */
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
}

.btn-cerrar:hover {
    background-color: #b71c1c;
}

.badge-carrito {
    background-color: #4a1a1a;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    position: relative;
    top: -10px;
    left: -5px;
}

/* Apuntamos directamente al icono dentro del enlace */
.btn-agregar-directo i {
    color: #4a1a1a;
    font-size: 24px;
    transition: all 0.3s ease;
}

.btn-agregar-directo:hover i {
    color: #330006;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    /* Aquí irán los ajustes para celular */
}
