/* =====================================================================
   Davimar - pagina publica (vistas/web.php)
   ---------------------------------------------------------------------
   Esta pagina usa Bootstrap 5 servido desde el propio hosting
   (public/plugins/bootstrap5) + Bootstrap Icons + la tipografia Poppins.
   NO pide nada a internet.

   Este archivo solo agrega lo propio de la tienda: la paleta de la
   plantilla (azul + naranja), el hero, las tarjetas de producto, los
   filtros y el carrito. El resto del aspecto lo pone Bootstrap.
   ===================================================================== */

:root {
    --azul: #0056b3;
    --azul-osc: #00234b;
    --azul-claro: #00a3e0;
    --naranja: #ff6b00;
    --naranja-osc: #e55d00;
    --gris: #6c757d;
    --gris-claro: #f0f4f8;
    --linea: #e3e8ef;
    --verde: #067647;
    --ambar: #b54708;
    --radio: 12px;
    /* Se pisan las variables de Bootstrap que usan los botones y los links. */
    --bs-primary: #0056b3;
    --bs-primary-rgb: 0, 86, 179;
    --bs-link-color: #0056b3;
    --bs-link-hover-color: #00234b;
}

body {
    font-family: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
    color: #333;
    background: #fff;
    overflow-x: hidden;   /* el hero va a lo ancho y no debe generar scroll lateral */
}

a { text-decoration: none; }

/* --------------------------- botones propios --------------------------- */
.btn-acento {
    background: var(--naranja); border: 2px solid var(--naranja); color: #fff;
    font-weight: 600; border-radius: 8px; padding: .6rem 1.4rem; transition: all .25s ease;
}
.btn-acento:hover, .btn-acento:focus { background: var(--naranja-osc); border-color: var(--naranja-osc); color: #fff; }
.btn-azul {
    background: var(--azul); border: 2px solid var(--azul); color: #fff;
    font-weight: 600; border-radius: 8px; padding: .6rem 1.4rem; transition: all .25s ease;
}
.btn-azul:hover { background: var(--azul-osc); border-color: var(--azul-osc); color: #fff; }
.btn-contorno {
    background: transparent; border: 2px solid rgba(255,255,255,.65); color: #fff;
    font-weight: 600; border-radius: 8px; padding: .6rem 1.4rem; transition: all .25s ease;
}
.btn-contorno:hover { background: #fff; color: var(--azul-osc); border-color: #fff; }

/* ------------------------------- barra ------------------------------- */
.barra { background: #fff; box-shadow: 0 2px 14px rgba(0,35,75,.08); }
.barra .navbar-brand img { height: 46px; width: auto; }
.barra .nav-link { color: #333; font-weight: 500; font-size: .95rem; padding: .6rem .8rem !important; }
.barra .nav-link:hover { color: var(--azul); }
.btn-carrito { position: relative; background: var(--azul); color: #fff; border: 0; border-radius: 8px; font-weight: 600; padding: .55rem 1rem; }
.btn-carrito:hover { background: var(--azul-osc); color: #fff; }
.btn-carrito .badge { position: absolute; top: -9px; right: -9px; background: var(--naranja); color: #fff; border-radius: 999px; font-size: .7rem; }

/* -------------------------------- hero -------------------------------- */
.hero { position: relative; height: 560px; overflow: hidden; }
.hero .carousel, .hero .carousel-inner, .hero .carousel-item { height: 100%; }
.hero .carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.hero .carousel-item::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, rgba(0,35,75,.93) 0%, rgba(0,86,179,.82) 55%, rgba(0,163,224,.55) 100%);
}
.hero-contenido { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; color: #fff; }
.hero-contenido h1 { font-size: 2.7rem; font-weight: 800; line-height: 1.15; margin-bottom: 1rem; }
.hero-contenido h1 span { color: #ffb878; }
.hero-contenido p.lead { color: rgba(255,255,255,.9); max-width: 620px; }
.hero-etiqueta {
    display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: .35rem 1rem;
    font-size: .82rem; font-weight: 600; margin-bottom: 1.1rem;
}
.buscador-hero { max-width: 540px; }
.buscador-hero .form-control { border: 0; padding: .85rem 1rem; font-size: .98rem; }
.buscador-hero .form-control:focus { box-shadow: none; }
.hero-mini { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radio); padding: 1.5rem; }
.hero-mini li { padding: .45rem 0; font-size: .92rem; color: rgba(255,255,255,.92); border-bottom: 1px solid rgba(255,255,255,.12); }
.hero-mini li:last-child { border-bottom: 0; }
.hero-mini i { color: #7ee2a8; }

/* ---------------------------- franja de datos ---------------------------- */
.franja { background: var(--azul-osc); color: #fff; padding: 2rem 0; }
.franja .dato-num { font-size: 1.9rem; font-weight: 800; display: block; line-height: 1.1; }
.franja .dato-txt { font-size: .85rem; color: rgba(255,255,255,.72); }

/* ------------------------------- titulos ------------------------------- */
.seccion { padding: 4.5rem 0; }
.seccion-gris { background: var(--gris-claro); }
.titulo-seccion { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.titulo-seccion small { color: var(--naranja); font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px; font-size: .78rem; }
.titulo-seccion h2 { font-size: 2.1rem; font-weight: 800; color: var(--azul-osc); margin: .6rem 0 .8rem; }
.titulo-seccion p { color: var(--gris); margin: 0; }

/* ------------------------------ categorias ------------------------------ */
.tarjeta-categoria { border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; transition: all .25s ease; height: 100%; }
.tarjeta-categoria:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(0,35,75,.13); border-color: var(--azul-claro); }
.tarjeta-categoria img { width: 100%; height: 160px; object-fit: cover; }
.tarjeta-categoria h5 { font-size: 1.05rem; font-weight: 700; color: var(--azul-osc); margin-bottom: .25rem; }
.tarjeta-categoria p { font-size: .85rem; color: var(--gris); margin: 0; }

/* ------------------------------- catalogo ------------------------------- */
.caja-buscar .form-control { border-radius: 8px; padding: .75rem 1rem; border: 2px solid var(--linea); }
.caja-buscar .form-control:focus { border-color: var(--azul); box-shadow: none; }
.chip { border: 1px solid var(--linea); background: #fff; color: #333; border-radius: 999px; padding: .45rem 1rem; font-size: .85rem; font-weight: 600; transition: all .2s ease; }
.chip:hover { border-color: var(--azul); color: var(--azul); background: #fff; }
.chip.activo { background: var(--azul); border-color: var(--azul); color: #fff; }

.producto { border: 1px solid var(--linea); border-radius: var(--radio); transition: all .25s ease; height: 100%; }
.producto:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,35,75,.12); }
.producto .cat { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--azul-claro); }
.producto h6 { font-size: .95rem; font-weight: 700; color: var(--azul-osc); line-height: 1.35; min-height: 2.6rem; margin: .35rem 0; }
.producto .codigo { font-size: .74rem; color: var(--gris); font-family: ui-monospace, Menlo, Consolas, monospace; }
.producto .insignia { font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .2rem .6rem; }
.producto .insignia.ok { background: #ecfdf3; color: var(--verde); }
.producto .insignia.pedido { background: #fffaeb; color: var(--ambar); }
.producto .pie-precio { border-top: 1px dashed var(--linea); padding-top: .7rem; margin-top: auto; flex-wrap: wrap; }
.producto .consulte { font-weight: 800; color: var(--azul-osc); font-size: .98rem; }
.producto .consulte small { display: block; font-size: .7rem; color: var(--gris); font-weight: 500; }

.pagination .page-link { color: var(--azul-osc); border-color: var(--linea); }
.pagination .page-item.active .page-link { background: var(--azul); border-color: var(--azul); color: #fff; }
.pagination .page-item.disabled .page-link { color: var(--gris); }

/* -------------------------------- pasos -------------------------------- */
.paso { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 2rem 1.6rem; height: 100%; }
.paso-num {
    width: 46px; height: 46px; border-radius: 12px; background: rgba(0,86,179,.1); color: var(--azul);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem; margin-bottom: 1rem;
}
.paso h5 { font-size: 1.05rem; font-weight: 700; color: var(--azul-osc); }
.paso p { color: var(--gris); font-size: .92rem; margin: 0; }

/* -------------------------------- fotos -------------------------------- */
.foto { border-radius: var(--radio); overflow: hidden; }
.foto img { width: 100%; height: 250px; object-fit: cover; transition: transform .35s ease; }
.foto:hover img { transform: scale(1.05); }

/* ------------------------------- contacto ------------------------------- */
.tarjeta-datos { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.8rem; height: 100%; }
.fila-dato { display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--gris-claro); font-size: .93rem; }
.fila-dato:last-child { border-bottom: 0; }
.fila-dato b { color: var(--azul-osc); min-width: 92px; }

/* -------------------------------- carrito -------------------------------- */
.linea-pedido { padding: .8rem 0; border-bottom: 1px solid var(--gris-claro); }
.linea-pedido h6 { font-size: .92rem; font-weight: 700; color: var(--azul-osc); margin-bottom: .15rem; }
.linea-pedido .codigo { font-size: .75rem; color: var(--gris); font-family: ui-monospace, Menlo, Consolas, monospace; }
.paso-cantidad .btn { border: 1px solid var(--linea); background: #fff; color: #333; width: 32px; height: 32px; padding: 0; border-radius: 8px; font-weight: 700; }
.paso-cantidad .btn:hover { border-color: var(--azul); color: var(--azul); }
.paso-cantidad input { width: 58px; height: 32px; text-align: center; border: 1px solid var(--linea); border-radius: 8px; font-size: .9rem; }
.quitar { border: 0; background: none; color: #dc3545; font-size: .8rem; font-weight: 600; padding: 0; }

/* --------------------------------- pie --------------------------------- */
.pie { background: var(--azul-osc); color: rgba(255,255,255,.75); padding: 3.2rem 0 1.5rem; }
.pie h5 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.pie a { color: rgba(255,255,255,.75); display: block; padding: .3rem 0; font-size: .9rem; }
.pie a:hover { color: #fff; }
.pie .marca img { background: #fff; border-radius: 10px; padding: 4px 8px; height: 52px; }
.pie-abajo { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem; font-size: .82rem; }

/* ------------------------------- avisos ------------------------------- */
.aviso { border-radius: 10px; padding: .8rem 1rem; font-size: .9rem; }
.aviso.rojo { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.aviso.verde { background: #ecfdf3; color: var(--verde); border: 1px solid #abefc6; }

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 991.98px) {
    .hero { height: auto; }
    .hero .carousel { height: 420px; }
    .hero-contenido { position: relative; padding: 2.5rem 0 3rem; }
    .hero-contenido h1 { font-size: 2.1rem; }
    .hero { background: var(--azul-osc); }
}
@media (max-width: 575.98px) {
    .hero .carousel { height: 300px; }
    .hero-contenido h1 { font-size: 1.7rem; }
    .seccion { padding: 3rem 0; }
    .titulo-seccion h2 { font-size: 1.6rem; }
    .franja .dato-num { font-size: 1.5rem; }
    .tarjeta-categoria img { height: 130px; }
    .foto img { height: 200px; }
    /* En el telefono el boton "Agregar" va debajo del precio y a lo ancho:
       al lado del precio no entra y empujaba la pagina 19px de mas. */
    .producto .pie-precio { flex-direction: column; align-items: stretch !important; gap: .55rem; }
    .producto .btn-agregar { width: 100%; }
    .producto h6 { font-size: .9rem; min-height: 0; }
}
