/* ========================
   Variables y base
   ======================== */
:root{
  --verde-titulos: #6A994E;
  --verde-pino: #386641;
  --naranja: #BC4749;
  --blanco-hueso: #FAF7F0;
  --texto-sec: #656565;
  --modal-bg: #FFFFFF;
  --producto-bg: #FFFFFF;
  /* Aliases para paleta fresca y natural */
  --brand-primary: var(--verde-pino);
  --brand-accent: var(--naranja);
  --bg-page: var(--blanco-hueso);
  --text-base: #222;
}
html,body{ height:100%; }
body{
  margin:0; background:var(--bg-page); color:var(--text-base);
  font-family: "Binggo Wood", "Montserrat", "Merriweather Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}

/* Utilidades de imagen */
.img-fluid{ max-width:100%; height:auto; display:block; }
img[loading="lazy"]{ filter: blur(0); }

/* Navegación móvil */
.nav-toggle{ display:inline-flex; align-items:center; justify-content:center; padding:.4rem .6rem; border:1px solid #e5e7eb; border-radius:.5rem; background:#fff; color:var(--brand-primary); }
.nav-toggle:hover{ background:#f9fafb; }
.nav-menu{ display:none; }
.nav-menu.open{ display:flex; flex-direction:column; gap:.5rem; padding:.5rem 0; }

/* ========================
   Botón principal
   ======================== */
.btn-primary{
  background: var(--naranja);
  color:white;
  font-weight:700;
  padding:.55rem 1rem;
  border-radius:.5rem;
  border:none;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
}
.btn-primary:hover{ filter:brightness(.95); cursor:pointer; }

.img-bordered{ border-radius:.5rem; border: 0px solid rgba(0,0,0,0); }

/* ========================
   Header / navegación
   ======================== */
header.site-header{ background:rgba(255,255,255,0.75); backdrop-filter: saturate(180%) blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow:0 6px 18px rgba(0,0,0,0.06); position:sticky; top:0; z-index:60; }
a.nav-link{ position:relative; color:var(--verde-pino); text-decoration:none; font-weight:600; }
a.nav-link:hover{ color:var(--verde-titulos); text-decoration:underline; }
/* Active link indicator */
a.nav-link.active{ color:var(--brand-accent); }
a.nav-link.active::after{ content:""; position:absolute; left:0; bottom:-4px; height:3px; width:100%; background:var(--brand-accent); border-radius:2px; }

/* ========================
   Slider (Index)
   ======================== */
.slider { position: relative; width: 100%; height: 500px; overflow: hidden; border-radius: .5rem; }
.slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; z-index: 0; }
.slider img.active { opacity: 1; }
.hero-text { position: absolute; left: 4%; top: 50%; transform: translateY(-50%); color: #fff; font-weight: 800; font-size: clamp(1.8rem, 4vw, 3.6rem); text-shadow: 2px 6px 18px rgba(0, 0, 0, 0.5); max-width: 60%; z-index: 10; }

/* ========================
   Tarjeta de producto
   ======================== */
.product-card{ background: var(--producto-bg); border-radius:.6rem; padding:1rem; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover{ transform: translateY(-6px); box-shadow: 0 14px 34px rgba(0,0,0,0.12); }
.product-card .title{ color:var(--verde-pino); font-weight:700; }
.product-card .price{ color:var(--verde-titulos); font-weight:700; }

/* ========================
   Modal / Backdrop
   ======================== */
.backdrop{ display:none; position:fixed; inset:0; background:rgba(0,0,0,0.45); align-items:center; justify-content:center; z-index:120; padding:1rem; }
.card { 
    background: var(--modal-bg); 
    border-radius: .75rem; 
    padding: 1.25rem; 
    max-width: 960px; 
    width: 100%; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    /* --- NUEVAS PROPIEDADES PARA SCROLL --- */
    max-height: 90vh;       /* Limita la altura al 90% de la pantalla */
    overflow-y: auto;       /* Agrega scroll vertical si el contenido es muy largo */
    position: relative;     /* Asegura que el botón de cerrar se posicione bien */
    display: flex;          /* Ayuda a organizar el contenido */
    flex-direction: column; /* Mantiene el orden vertical */
}

#cartPanel .card{ max-width:420px; }

/* ========================
   Modal Animations (updated)
   ======================== */
.backdrop{ opacity:0; pointer-events:none; transition: opacity .24s ease; }
.backdrop.open{ opacity:1; pointer-events:auto; }
.backdrop .card{ transform: translateY(-6px); opacity:.96; transition: transform .24s ease, opacity .24s ease; }
.backdrop.open .card{ transform: translateY(0); opacity:1; }

/* Close button for modals */
.modal-close{ background:transparent; border:none; color:var(--brand-primary); font-size:1.4rem; line-height:1; padding:.25rem .5rem; border-radius:.375rem; cursor:pointer; }
.modal-close:hover{ background:rgba(56,102,65,0.08); }

/* ========================
   Footer Layout (new)
   ======================== */
.footer-columns{ display:grid; grid-template-columns: 1fr; gap:1rem; }
@media(min-width:768px){ .footer-columns{ grid-template-columns: repeat(3, 1fr); } }
.footer-title{ color:var(--verde-pino); font-weight:800; margin-bottom:.5rem; }
.footer-links{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.4rem; }
.footer-link{ color:var(--brand-primary); text-decoration:none; font-weight:600; background:none; border:none; padding:0; cursor:pointer; }
.footer-link:hover{ color:var(--verde-titulos); text-decoration:underline; }
.footer-legal .footer-link{ font-weight:700; }

/* ========================
   Footer Rediseñado (Más Vistoso)
   ======================== */

footer.site-footer {
    background-color: var(--verde-pino); /* Fondo verde oscuro */
    color: #ffffff; /* Texto blanco */
    padding: 4rem 0 2rem; /* Más espacio vertical para elegancia */
    border-top: 6px solid var(--verde-titulos); /* Borde superior llamativo */
    position: relative;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.05); /* Sombra sutil hacia arriba */
}

/* Títulos de las columnas */
.footer-title {
    color: #ffffff !important; /* Forzar blanco */
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
}

/* Pequeña línea decorativa debajo de los títulos */
.footer-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--naranja); /* Acento naranja */
    margin-top: 5px;
    border-radius: 2px;
}

/* Enlaces */
.footer-link {
    color: rgba(255, 255, 255, 0.8) !important; /* Blanco con ligera transparencia */
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: #ffffff !important;
    text-decoration: none;
    transform: translateX(5px); /* Pequeño movimiento a la derecha al pasar el mouse */
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Sección Social */
.footer-social .subtitle {
    color: rgba(255, 255, 255, 0.6) !important; /* Subtítulos más tenues */
}

.social-item .desc {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Botones de redes sociales */
.social-link {
    background: rgba(255, 255, 255, 0.1); /* Fondo semitransparente */
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link .icon {
    background: transparent !important; /* Quitar fondo sólido del icono */
    color: var(--naranja) !important; /* Icono naranja */
}

.social-link:hover {
    background: #ffffff; /* Fondo blanco al pasar mouse */
    color: var(--verde-pino) !important; /* Texto verde */
    transform: translateY(-3px); /* Efecto de elevación */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Derechos de autor (parte inferior) */
.site-footer .text-center {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}
footer.site-footer {
    /* ... las propiedades anteriores ... */
    border-top-left-radius: 2rem; /* Redondea la esquina superior izquierda */
    border-top-right-radius: 2rem; /* Redondea la esquina superior derecha */
    margin-top: 2rem; /* Separa un poco del contenido anterior */
}
/* ========================
   Toasts (Notificaciones)
   ======================== */
#toastContainer {
    position: fixed;
    bottom: 1.5rem;        /* Fijo abajo */
    left: 50%;             /* Centrado horizontalmente */
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column-reverse; /* Los nuevos aparecen abajo */
    gap: 0.5rem;
    width: 90%;            /* Ancho adaptable en móvil */
    max-width: 380px;      /* Ancho máximo en PC */
    pointer-events: none;  /* Permite hacer clic detrás del contenedor */
}

.toast {
    background: rgba(255, 255, 255, 0.95); /* Fondo semitransparente */
    backdrop-filter: blur(4px);
    border-left: 4px solid var(--verde-titulos); /* Borde más sutil */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0.6rem 1rem;  /* Padding reducido (más compacto) */
    border-radius: 2rem;   /* Bordes muy redondos (estilo "píldora") */
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: toastSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animación suave */
    pointer-events: auto;  /* Habilita clic en la notificación */
    font-size: 0.85rem;    /* Texto más pequeño */
    cursor: pointer;       /* Indica que se puede cerrar */
}

.toast .msg {
    margin-right: 0.5rem;
    color: #222;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Máximo 2 líneas de texto */
    -webkit-box-orient: vertical;
}

/* Contador de repeticiones (Badge) */
.toast-counter {
    background: var(--verde-pino);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
    display: none; /* Oculto por defecto */
}
.toast-counter.show { display: inline-block; }

.toast button {
    background: transparent;
    border: none;
    color: #999;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0 0 0.5rem;
}

/* Animación de entrada desde abajo */
@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width:768px){ .slider{ height:320px; } header .container{ padding-left:.75rem; padding-right:.75rem; } }

/* Mobile-first ajuste de navegación */
@media (max-width:768px){
  nav.md\:flex{ display:none; }
}
@media (min-width:769px){
  .nav-menu{ display:none !important; }
}

/* ========================
   Sidebar (Productos)
   ======================== */
.cat-item{ border:1px solid #eee; border-radius:.5rem; background:#fff; }
.cat-header{ display:flex; justify-content:space-between; align-items:center; padding:.6rem .75rem; cursor:pointer; color:var(--verde-pino); font-weight:700; }
.cat-header:hover{ background:#f8f8f8; }
.sub-list{ display:none; border-top:1px solid #eee; }
.sub-item{ padding:.5rem .75rem; cursor:pointer; color:var(--texto-sec); }
.sub-item:hover{ background:#f7f7f7; color:var(--verde-titulos); }
.active-filter{ background:#f0fff0; }

/* ========================
   Ticket (común)
   ======================== */
.ticket { font-family: "Montserrat", Arial, sans-serif; color:#111; max-width:380px; width:100%; margin:0 auto; background:#fff; border-radius:.6rem; padding:1rem; box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.ticket .logo { text-align:center; margin-bottom:8px; }
.ticket h2 { margin:0; color:var(--verde-pino); font-size:1.05rem; letter-spacing:.5px; }
.ticket .muted { color:var(--texto-sec); font-size:.92rem; }
.ticket table { width:100%; border-collapse:collapse; margin-top:.6rem; }
.ticket th, .ticket td { padding:.35rem .4rem; text-align:left; border-bottom:1px solid #f0f0f0; font-size:.92rem; }
.ticket .right { text-align:right; }
.ticket .totals { margin-top:.6rem; }
.ticket .big { font-weight:800; font-size:1.02rem; }
.ticket .status { display:inline-block; border:2px solid #111; padding:.35rem .5rem; margin-top:.6rem; font-weight:800; font-size:.85rem; }
.ticket .small-muted { font-size:.82rem; color:var(--texto-sec); margin-top:.45rem; display:block; }
#ticketModal .card{ max-width:420px; padding:0.9rem; }
#ticketModal .card .ticket { box-shadow:none; margin:0; border-radius:.5rem; }

/* ========================
   Footer Social (nuevo)
   ======================== */
.footer-social .title{ color:var(--verde-pino); font-weight:800; font-size:1rem; }
.footer-social .subtitle{ color:var(--texto-sec); font-size:.95rem; margin:.25rem 0 .75rem; }
.social-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.6rem; }
.social-item{ display:flex; flex-direction:column; gap:.25rem; }
.social-link{ display:inline-flex; align-items:center; gap:.6rem; text-decoration:none; color:var(--brand-primary); padding:.5rem .6rem; border-radius:.6rem; transition: background .18s ease, transform .18s ease, color .18s ease, box-shadow .18s ease; }
.social-link .icon{ width:28px; height:28px; border-radius:50%; background:var(--brand-primary); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:16px; }
.social-link .text{ font-weight:700; }
.social-item .desc{ color:var(--texto-sec); font-size:.9rem; padding-left:2.4rem; }
.social-link:hover{ background:rgba(56,102,65,0.08); color:var(--verde-titulos); transform:translateY(-1px); box-shadow:0 8px 20px rgba(0,0,0,.06); }
.social-link:focus{ outline:2px solid var(--brand-accent); outline-offset:2px; }

/* Hero video support */
.slider video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.slider.video-playing img{ opacity:0 !important; }

/* Tabs and FAQ */
.tab-btn{ background:#fff; color:var(--brand-primary); font-weight:700; }
.tab-btn[aria-selected="true"]{ background:rgba(56,102,65,0.08); color:var(--verde-titulos); }
.tab-panel.hidden{ display:none; }
.accordion-panel.hidden{ display:none; }

/* Stats */
.stat-value{ line-height:1; }
/* ========================
   Clases de utilidad (Refactor)
   ======================== */
.text-verde-pino { color: var(--verde-pino); }
.text-verde-titulos { color: var(--verde-titulos); }
.text-secundario { color: var(--texto-sec); }
.font-brand { font-family: 'Binggo Wood', Georgia, serif; }
.font-size-sm { font-size: .85rem; }
.font-size-lg { font-size: 1.2rem; }
.font-size-xl { font-size: 1.6rem; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.block { display: block; }
.hidden-visually {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================
   Cookie Banner & Modal
   ======================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2a3d31; /* Un color oscuro de tu paleta */
    color: var(--blanco-hueso, #FAF7F0);
    padding: 1.25rem 1.5rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    flex-wrap: wrap;
    gap: 1rem;
}
.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 600px;
}
.cookie-content a {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
}
.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.cookie-btn {
    padding: .5rem 1rem;
    border-radius: .5rem;
    border: none;
    cursor: pointer;
    font-weight: 700;
}
.cookie-btn.btn-primary {
    background: var(--naranja, #BC4749);
    color: white;
}
.cookie-btn.btn-secondary {
    background: transparent;
    border: 2px solid var(--blanco-hueso, #FAF7F0);
    color: var(--blanco-hueso, #FAF7F0);
}
.cookie-btn.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.cookie-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.cookie-modal-content {
    background: var(--modal-bg, #FFFFFF);
    border-radius: .75rem;
    padding: 1.5rem 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.cookie-modal-content h3 {
    color: var(--verde-pino, #386641);
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.cookie-toggle {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}
.cookie-toggle label {
    cursor: pointer;
}
.cookie-toggle label small {
    display: block;
    color: var(--texto-sec, #656565);
    font-size: 0.85rem;
    margin-top: 4px;
}
.cookie-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
}
.cookie-modal-actions {
    margin-top: 1.5rem;
    text-align: right;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-actions {
        width: 100%;
        justify-content: space-between;
    }
    .cookie-actions .cookie-btn {
        flex-grow: 1;
        text-align: center;
    }
}
.modal-close-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--texto-sec, #656565);
  cursor: pointer;
  padding: 0;
  font-weight: bold;
  opacity: 0.7;
  z-index: 10;
}
.modal-close-x:hover {
  opacity: 1;
  color: var(--naranja, #BC4749);
}

/* =========================================
   MEJORAS VISUALES: MIS PEDIDOS (Tu pedido.html)
   ========================================= */

/* --- Tarjetas del Historial --- */
.order-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--verde-titulos);
}

/* Borde lateral de color según estado */
.order-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #ccc; /* Default */
}
.order-card.status-entregado::before { background: var(--verde-pino); }
.order-card.status-en_camino::before { background: var(--naranja); }
.order-card.status-preparando::before { background: #F59E0B; } /* Amarillo */
.order-card.status-pendiente::before { background: #3B82F6; } /* Azul */

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 800;
    color: var(--verde-pino);
    font-size: 1.1rem;
}

.order-date {
    font-size: 0.85rem;
    color: var(--texto-sec);
}

.order-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111;
}

/* --- Badges (Etiquetas de Estado) --- */
.status-badge {
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-entregado { background: #dcfce7; color: #166534; }
.badge-en_camino { background: #ffedd5; color: #9a3412; }
.badge-preparando { background: #fef3c7; color: #92400e; }
.badge-pendiente { background: #dbeafe; color: #1e40af; }

/* --- Línea de Tiempo (Stepper) --- */
.timeline-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
}

/* Línea de fondo gris */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
}

/* Línea de progreso coloreada */
.timeline-progress {
    position: absolute;
    top: 15px;
    left: 0;
    height: 3px;
    background: var(--verde-pino);
    z-index: 0;
    width: 0%; /* Se controla con JS */
    transition: width 1s ease;
}

.timeline-step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 25%;
}

.step-icon {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 3px solid #e5e7eb;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #ccc;
    transition: all 0.5s ease;
}

.timeline-step.active .step-icon {
    border-color: var(--verde-pino);
    background: var(--verde-pino);
    color: #fff;
    transform: scale(1.1);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--texto-sec);
}

.timeline-step.active .step-label {
    color: var(--verde-pino);
    font-weight: 800;
}

/* Ticket Detail View */
.detail-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    overflow: hidden;
}
.detail-header {
    background: var(--verde-pino);
    color: white;
    padding: 1.5rem;
    text-align: center;
}
/* Hace que las listas de items (carrito, ticket) ocupen el espacio sobrante y tengan scroll */
#cartItems, 
#ticketContentWrap, 
#coItems,
#lista-pedidos {
    flex: 1;            /* Toma el espacio disponible */
    overflow-y: auto;   /* Scroll interno solo para la lista */
    min-height: 0;      /* Necesario para que flexbox permita el scroll en Firefox */
    padding-right: 5px; /* Espacio para que la barra de scroll no tape texto */
}

/* Estiliza la barra de scroll para que se vea moderna (estilo Webkit) */
.card::-webkit-scrollbar,
#cartItems::-webkit-scrollbar,
#ticketContentWrap::-webkit-scrollbar {
    width: 8px;
}

.card::-webkit-scrollbar-track,
#cartItems::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 4px;
}

.card::-webkit-scrollbar-thumb,
#cartItems::-webkit-scrollbar-thumb {
    background: var(--verde-pino); 
    border-radius: 4px;
}
/* =========================================
   AJUSTE ESPECÍFICO PARA LOGIN
   ========================================= */
#loginModal .card {
    max-height: 90vh;       /* Limita la altura al 90% de la ventana */
    overflow-y: auto;       /* Habilita el scroll si el contenido se desborda */
    display: flex;
    flex-direction: column;
}

/* Opcional: Si quieres que el formulario ocupe el espacio y haga scroll interno 
   manteniendo el título fijo arriba */
#authForm {
    overflow-y: auto; 
    padding-right: 5px; /* Espacio para la barra de desplazamiento */
}
@media screen and (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important; /* Previene zoom en iOS */
  }
}
/* En móvil, la barra de búsqueda se pega al hacer scroll */
#searchInput {
    position: sticky; 
    top: 70px; /* Ajustar según la altura de tu header */
    z-index: 40;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.product-card:active {
    transform: scale(0.98); /* Efecto de hundimiento sutil */
    transition: transform 0.1s;
}
.btn-primary:active {
    background-color: #a33b3d; /* Un tono más oscuro de tu naranja */
}
/* ========================
   Filtros Off-Canvas (Móvil)
   ======================== */

/* Por defecto (Desktop): se comporta como un bloque normal */
.filter-sidebar {
    display: block;
}
.filter-backdrop {
    display: none;
}

/* Solo en Móvil (pantallas menores a 768px) */
@media (max-width: 768px) {
    /* El contenedor se vuelve fijo y ocupa toda la pantalla (invisible al inicio) */
    .filter-sidebar {
        position: fixed;
        inset: 0;
        z-index: 100;
        pointer-events: none; /* Permite clicks traseros si está cerrado */
        visibility: hidden;
        transition: visibility 0.3s;
    }

    /* El contenido blanco (panel lateral) */
    .filter-content {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 80%;
        max-width: 300px;
        background: white;
        padding: 1.5rem;
        transform: translateX(-100%); /* Oculto a la izquierda */
        transition: transform 0.3s ease-out;
        z-index: 102;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    /* Fondo oscuro semitransparente */
    .filter-backdrop {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        transition: opacity 0.3s;
        z-index: 101;
    }

    /* CLASE ACTIVADA CON JS: Muestra el panel */
    .filter-sidebar.open {
        visibility: visible;
        pointer-events: auto;
    }
    .filter-sidebar.open .filter-content {
        transform: translateX(0); /* Desliza hacia adentro */
    }
    .filter-sidebar.open .filter-backdrop {
        opacity: 1;
    }
}