body{
    margin: 0; padding: 0;
    font-family:Arial, sans-serif;
    background-color: #f8f4e6; 
}
button {
    background-color: #5e4a34;
    color: #f8f4e6;
    border-radius: 20px;
    font-size: 20px;
}
button:hover{
    background-color: #7f704d;
}

.menu{
    background-color: #a59474;
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
}
.menu a{
    color: #f8f4e6;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 20px;
    font-weight: bold;
    position: relative;
    transition: color 0.3s ease;
}
.menu a::after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background-color: #7f704d;
    transition: width 0.3s esase;
}
.menu a:hover {
    color: #7f704d; /* Cambia el color del texto al hacer hover */
}
.menu a:hover::after{
    width: 100%;
}

header {
    background-image: url('img/Fondo.jpg'); /* Cambia la URL si quieres otra */
    background-size: cover;
    background-position: center;
    color: white;
    padding: 30px;
    margin-top: 50px;
    border-bottom: 2px solid #ddd;
    position: relative;
    overflow: hidden;
    text-align: left;
}
header p{
    margin: 5px 0;
    font-size: 1rem;
    font-weight: bold;
    color: white;
}
.llamar-mesero {
    text-align: right;
}
.mesero {
    background-color: #5e4a34;
    color: #f3f3f3;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
}
.numero-mesa{
    display: none;
    text-align: right;
    margin: 2px auto;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.numero-mesa label,
.numero-mesa input,
.numero-mesa button {
   margin-bottom: 10px; 
}
.header-content{
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}
.container {
    margin: 2rem auto;
    max-width: 900px;
}
.header-img{
    width: 130px;
    height: auto;
    border-radius: 10px;
}
.info{
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #4a3b28;
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}
header > * {
    position: relative;
    z-index: 1;
}

.formulario{
    text-align: center;
    font-size: 20px;
}
input[type="text"],
input[type="time"] {
    width: 50%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #e4d8b8;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 10px;
}
#mesa-disponible {
    width: 50%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #e4d8b8;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.intro{
    text-align: center;
    font-size: 20px;
}

.elige{
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 30px 20px;
    background-color: #d1c0a1;
    margin: 30px auto;
    border-radius: 20px;
    max-width: 1000px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.categoria {
    background-color: #F7F7F7;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    width: 150px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.categoria img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;border-radius: 10px;
}
.categoria a {
    display: block;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 18px;
}
.categoria:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px #fee8c1;
}

.contenedor-platillos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px auto;
    max-width: 1000px;
    padding: 10px;
}
.platillos-desayuno,
.platillos-comida,
.platillos-rapida,
.platillos-bebida,
.platillos-antojos,
.platillos-carnes,
.platillos-frias,
.platillos-calientes,
.platillos-postre,
.platillos-comidatiempos {
    border: 2px dotted #4a3b28; /* contorno punteado */
    padding: 15px;
    margin: 20px;
    border-radius: 10px;
    width: 250px;
    background-color: #e4ccb4;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    display: inline-block; /* para que estén en línea */
    vertical-align: top;
    text-align: center;
}
/* Contenedor de subcategorías con scroll horizontal */
.subcategorias {
    position: relative;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 10px;
    padding: 10px;
    margin: 0 20px;
    scroll-behavior: smooth;
}

/* Botones de subcategorías */
.subcategorias button {
    flex: 0 0 auto;
    padding: 10px 15px;
    border: none;
    background-color: #d1c0a1;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.subcategorias button:hover {
    background-color: #f8f4e6;
    color: #4a3b28;
}

.carrito {
    background: #f8f8f8;
    padding: 10px;
    margin-top: 30px;
    border: 1px solid #e4d8b8;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
}
.carrito h2 {
    text-align: center;
}
.carrito ul {
    list-style: none;
    padding: 0;
}
.carrito li {
    margin: 8px 0;
}
.carrito button {
    margin-left: 5px;
}

.resumen-pedido{
    background: #f8f8f8;
    margin-top: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    border: 1px solid #e4d8b8;
    text-align: center;
    border-radius: 10px;
}
#cantidad-efectivo{
    width: 50%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #e4d8b8;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 10px;
}
#fecha-exp{
    width: 50%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #e4d8b8;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 10px;
}
#cvv{
    width: 50%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #e4d8b8;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.etapas {
    list-style: none;
    padding-left: 0;
    max-width: 400px;
    margin: 30px auto;
    padding: 0;
}

.etapas li {
    padding: 15px 20px;
    background-color: #f1f1f1;
    margin-bottom: 10px;
    border-left: 6px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.etapas li::before {
    content: "✓";
    color: #acacac;
    font-weight: bold;
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
}

.etapas li.activa {
    background-color: #a59474;
    border-left: 6px solid #5e574a;
    color: #fffaf1;
    font-weight: bold;
}

.etapas li.activa::before {
    color: #a59474;
}
#mapa {
    width: 100%;
    max-width: 600px;
    height: 350px;
    margin: 20px auto;
    border: 4px solid #fee8c1;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.footer {
    background-color: #645e44;
    color: #f1f1f1;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 14px;
}
.footer a {
    color: #f1f1f1;
    margin: 0 8px;
    text-decoration: none;
    transition: color 0.3s;
}
.footer a:hover {
    color: #fee8c1;
}

.footer-content i {
    margin-right: 5px;
}

/* Contenedor del toggle */
.toggle-container {
  display: flex;
  align-items:flex-end;
  gap: 10px;
  font-size: 16px;
}
/* Estilos del switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  border-radius: 50%;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
}
/* Cambios cuando el toggle está activado */
input:checked + .slider {
  background-color: #934caf;
}
input:checked + .slider:before {
  transform: translateX(18px);
}


/* 🌑 MODO OSCURO (fondo negro y detalles morados) */
body.dark-mode {
    background-color: #121212;
    color: #fee8c1;
}

/* Menú superior */
body.dark-mode .menu {
    background-color: #1f1f1f;
}
body.dark-mode .menu a {
    color: #f1f1f1;
}
body.dark-mode .menu a:hover{
    color: #fee8c1;
}
body.dark-mode .menu a::after {
    background-color: #fee8c1; /* detalle morado */
}

/* Encabezado */
body.dark-mode header {
    background-blend-mode: overlay;
    color: #f1f1f1;
    border-bottom: 2px solid #fee8c1;
}
body.dark-mode header p {
    color: #f1f1f1;
}

/* Botones */
body.dark-mode button,
body.dark-mode .mesero {
    background-color: #fee8c1;
    color: #121212;
    border: none;
}
/* Fondo del contenedor de categorías */
body.dark-mode .elige {
    background-color: #1e1e1e;
}
/* Texto dentro de las tarjetas de categoría */
body.dark-mode .categoria a {
    color: #f1f1f1;
}
/* Categorías */
body.dark-mode .categoria {
    background-color: #1e1e1e;
    color: #f1f1f1;
    border: 1px solid #fee8c1;
}
body.dark-mode .categoria:hover {
    box-shadow: 0 13px 12px rgba(173, 124, 68, 0.5);
}

/* Contenedor de platillos */
body.dark-mode .platillos-desayuno,
body.dark-mode .platillos-comida,
body.dark-mode .platillos-rapida,
body.dark-mode .platillos-bebida,
body.dark-mode .platillos-antojos,
body.dark-mode .platillos-carnes,
body.dark-mode .platillos-frias,
body.dark-mode .platillos-calientes,
body.dark-mode .platillos-postre,
body.dark-mode .platillos-comidatiempos{
    background-color: #1e1e1e;
    color: #ffffff;
    border: 2px dotted #fee8c1;
}
/* Carrito */
body.dark-mode .carrito {
    background-color: #1f1f1f;
    color: #f1f1f1;
    border: 1px solid #fee8c1;
}

/* Formularios */
body.dark-mode input[type="text"],
body.dark-mode input[type="time"],
body.dark-mode select,
body.dark-mode #mesa-disponible {
    background-color: #2a2a2a;
    color: #f1f1f1;
    border: 1px solid #fee8c1;
}
body.dark-mode .resumen-pedido {
    background: #1f1f1f;  /* u otro tono oscuro */
    color: #f1f1f1;
    border: 1px solid #fee8c1; /* opcional para mantener el estilo */
}
/* Otros detalles */
body.dark-mode .numero-mesa {
    background-color: #1e1e1e;
    color: #f1f1f1;
    border: 1px solid #fee8c1;
}
body.dark-mode .etapas li {
    color: #000; /* El color del texto será negro por defecto */
}
body.dark-mode .etapas li.activa {
    background-color: #a59474;
    border-left: 6px solid #5e574a;
    color: #fffaf1; /* El texto será blanco cuando esté activo */
}
body.dark-mode .etapas li.activa::before {
    color: #a59474;
}

body.dark-mode .intro,
body.dark-mode .formulario {
    color: #f1f1f1;
}
body.dark-mode .footer{
    background-color: #121212;
}

/*Media querys para telefonos*/
@media screen and (max-width: 768px) {
    .menu {
        flex-direction: flex;
        align-items: center;
        justify-content: space-around;
    }
    .menu a{
        font-size: 12px;
    }

    .header-content {
        margin-top: 40px;
        flex-direction: column;
        text-align: center;
    }
    .header-img {
        width: 100px;
        margin-bottom: 10px;
    }
    .info {
        align-items: center;
        text-align: center;
    }
    .mesero{
        font-size: 5px;
        border-radius: 10px;
    }

     .elige {
        display: flex;
        overflow-x: auto; /* Scroll horizontal */
        scroll-snap-type: x mandatory; /* Snap para que se alinee al elemento */
        -webkit-overflow-scrolling: touch; /* Suaviza scroll en iOS */
        gap: 20px;
        padding: 20px 10px;
        flex-wrap: nowrap;  /* <== quitar el wrap para scroll horizontal */
        justify-content: flex-start; /* para que quede al inicio */
        scroll-behavior: smooth;
    }

    .categoria {
        flex: 0 0 80%; /* que cada item ocupe 80% del ancho del contenedor */
        scroll-snap-align: center; /* alineación snap para el carrusel */
        width: auto !important; /* quitar el width fijo */
    }

    /* Opcional: quitar scrollbar visible */
    .elige::-webkit-scrollbar {
        display: none;
    }
    .elige {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    .contenedor-platillos {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .platillos-desayuno,
    .platillos-comida,
    .platillos-rapida,
    .platillos-bebida,
    .platillos-postre,
    .platillos-comidatiempos {
        width: 90% !important;
        margin: 10px auto;
    }

    .formulario input[type="text"],
    .formulario input[type="time"],
    #mesa-disponible {
        width: 90% !important;
    }

    .carrito {
        max-width: 90%;
    }

    .numero-mesa {
        text-align: center;
        padding: 20px;
    }

    button,
    .mesero {
        font-size: 14px;
        padding: 10px 14px;
    }
}