/* ===================================
   Estilos generales
=================================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #333;
}

/* Header */
header {
    background: url("../img/FONDO MARMOL.jpg") repeat-x center top;
    background-size: auto 180px;
    color: white;
    text-align: center;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 40px;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8);
}

/* Navegación */
nav {
    background: #92f5f8;
    display: flex;
    justify-content: center;
    gap: 140px;
    padding: 10px 0;
    flex-wrap: wrap;
    width: 100%;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    font-size: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    transition: 0.3s;
}

nav a:hover {
    background-color: #ff99cc;
    border-radius: 5px;
}

/* Título de la categoría */
.titulo-catalogo-container {
    text-align: center;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.bienvenida {
    font-size: 2.2rem;
    color: #ff99cc;
}

/* Panel de productos */
.panel {
    padding: 15px;
    width: 90%;
    margin: 0 auto 40px auto;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.producto {
    border-radius: 10px;
    padding: 10px;
    background: #ffe6f0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.producto img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

.nombre-producto-texto {
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    color: #000000;
    margin: 5px 0;
}

.precio-producto {
    color: #ff66aa;
    font-weight: bold;
    margin: 10px 0;
    font-size: 24px;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.precio-producto .precio-original {
    text-decoration: line-through;
    font-size: 16px;
    color: #999;
}

textarea {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: none;
  font-family: inherit;
}

/* Modal de imagen */
#modalImagen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#modalImagen.show {
    display: flex;
    opacity: 1;
}

#modalImagen img {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

#modalImagen.show img {
    transform: scale(1);
}

/* Título de la categoría */
.titulo-catalogo-container {
    text-align: center;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.bienvenida {
    font-size: 2.2rem;
    color: #ff99cc;
}

/* Panel de productos */
.panel {
    padding: 15px;
    width: 90%;
    margin: 0 auto 40px auto;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 productos por fila */
    gap: 20px;
}

.producto {
    border-radius: 10px;
    padding: 10px;
    background: #ffe6f0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.producto img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

.nombre-producto-texto {
    font-weight:normal;
    font-size: 16px;
    color: #000000;
    margin: 5px 0;
}

.precio-producto {
    color: #ff66aa;
    font-weight: bold;
    margin: 10px 0;
    font-size: 24px;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.agregar-btn {
    background-color: #67c9cc;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.agregar-btn:hover {
    background-color: #ff66aa;
}

/* Modal de imagen */
#modalImagen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#modalImagen.show {
    display: flex;
    opacity: 1;
}

#modalImagen img {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

#modalImagen.show img {
    transform: scale(1);
}

#cerrar-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
}

#cerrar-modal:hover {
    color: #ff5c5c;
}

/* Carrito flotante */
.carrito {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.btn-carrito {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ff99cc;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.btn-carrito:hover {
    background: #50dace;
}

.contenido-carrito {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: #92f5f8;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
    color: #333;
}

.contenido-carrito.abierto {
    display: block;
}

.contenido-carrito ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.nombre-producto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.eliminar-btn {
    background-color: #ff66aa;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.8rem;
}

.eliminar-btn:hover {
    background-color: #ff3388;
}

.enviar-btn {
    background-color: #ff3388;
    color: white;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.enviar-btn:hover {
    background-color: #ff1a75;
}


/* Total en negrita y más grande */
#totalCarrito {
  font-weight: bold;
  font-size: 1.1rem;
  color: #090909;
}
/* ====== Estilos carrito flotante ====== */
.carrito-flotante { position: fixed; right: 20px; bottom: 20px; z-index: 1200; font-family: inherit; }
.btn-carrito {
  width:64px;height:64px;border-radius:50%;
  background: linear-gradient(180deg,#ff99cc,#ff66aa);
  border:none;color:#fff;font-size:26px;cursor:pointer;
  box-shadow:0 8px 18px rgba(0,0,0,0.2);
  display:flex;align-items:center;justify-content:center;
}
.panel-carrito {
  position: absolute;
  bottom: 84px;
  right: 0;
  width: 320px;
  max-height: 70vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}
.panel-carrito[aria-hidden="false"] {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.carrito-header {
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 14px;background: linear-gradient(90deg,#ff99cc,#7fe3d3);
  color:#fff;
}
.carrito-header h3 { margin:0;font-size:1rem; }
.cerrar { background:none;border:none;color:#fff;font-size:18px;cursor:pointer; }
.carrito-body { padding:12px; max-height: calc(70vh - 96px); overflow-y:auto; }
.lista-carrito { list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px; }
.item-carrito { display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px;background:#fff0f5; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.item-carrito .nombre { flex:1;font-weight:600;font-size:0.95rem; }
.item-carrito .precio { font-weight:700;color:#c2186c; }
.item-carrito .qty-control { display:flex;align-items:center;gap:6px; }
.qty-btn { background:#67c9cc;border:none;color:#fff;padding:4px 8px;border-radius:6px;cursor:pointer;font-weight:700; }
.qty-input { width:42px;text-align:center;border-radius:6px;padding:4px;border:1px solid #eee; }

.carrito-total { padding-top:10px;border-top:1px solid #f2f2f2;margin-top:8px; }
.carrito-total label { display:block;font-size:0.85rem;color:#666;margin-bottom:6px; }
.carrito-total input[type="text"] { width:100%; padding:8px;border-radius:8px;border:1px solid #e8e8e8;margin-bottom:8px; }
#totalCarrito { font-weight:800;font-size:1.05rem;color:#090909;margin:6px 0; }

.carrito-actions { display:flex;gap:8px; }
.btn-accion { flex:1;padding:8px;border-radius:8px;border:none;cursor:pointer;background:#f0f0f0;color:#333;font-weight:700; }
.btn-enviar { background: linear-gradient(90deg,#ff99cc,#ff66aa); color:#fff; }

.toast {
  position: fixed; right: 20px; bottom: 100px; z-index:1300;
  background: rgba(0,0,0,0.8); color:#fff; padding:10px 14px;border-radius:8px;
  opacity:0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity:1; transform: translateY(0); }

/* Footer */
footer {
    background: #92f5f8;
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    width: 100%;
}

/* Responsive */
@media(max-width:900px) {
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:600px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }

    nav {
        gap: 20px;
    }

    header h1 {
        font-size: 32px;
    }
}
