/* ============================= */
/* PALETA CORPORATIVA SACRAMENTO */
/* ============================= */
html {
    font-size: 18px; /* Default Bootstrap es 16px */
}

body {
    font-size: 1rem;
}


:root{
    --azul-sacramento: #0028FF;   /* principal */
    --azul-soft: #2f4dff;         /* degradados */
    --amarillo-sacramento: #FFED00;
    --blanco: #FFFFFF;
    --gris-texto: #5f6368;
    --rojo-acento: #E30613;
}


body{
    background:
        radial-gradient(circle at top left, rgba(0,40,255,.18), transparent 35%),
        radial-gradient(circle at top right, rgba(0,40,255,.12), transparent 35%),
        linear-gradient(180deg,#f0f3ff,#ffffff);
}




/* Wrapper */
.pedido-wrapper{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:16px;
}

/* Card principal */
.pedido-card{
    width:100%;
    max-width:420px;
    border-radius:22px;
    border:none;
    background: var(--blanco);
    box-shadow:0 14px 40px rgba(0,40,255,.18);
}

/* Loader */
.global-loader{
    position:fixed;
    inset:0;
    background:rgba(255,255,255,.85);
    backdrop-filter:blur(6px);
    z-index:99999;
    display:flex;
    align-items:center;
    justify-content:center;
}

.loader-box{
    background:white;
    padding:24px 32px;
    border-radius:16px;
    box-shadow:0 10px 30px rgba(0,0,0,.15);
}

body.loading{
    overflow:hidden;
}

/* Animación breathing logo */
@keyframes breathing{
    0%{transform:scale(1);opacity:1}
    50%{transform:scale(1.04);opacity:.96}
    100%{transform:scale(1);opacity:1}
}

.logo-breathing{
    animation:breathing 3.5s ease-in-out infinite;
}

/* Inputs */
.form-control,.form-select{
    border-radius:14px;
    border:1px solid #dfe3ff;
}

.form-control:focus{
    border-color:var(--azul-soft);
    box-shadow:0 0 0 .15rem rgba(11,44,255,.25);
}

/* Texto */
.hero-text{
    font-weight:800;
    font-size:1rem;
    color:var(--azul-sacramento);
    letter-spacing:.3px;
}

.text-muted{
    color:var(--gris-texto)!important;
}

/* Micro beneficios */
.mini-benefits{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    font-size:.78rem;
}

.mini-benefits div{
    background:linear-gradient(135deg,#f4f6ff,#ffffff);
    padding:9px 10px;
    border-radius:12px;
    text-align:center;
    border:1px solid  rgba(0,40,255,.12);
    color:#0f172a;
    font-weight:500;
}

/* Botón principal */
.btn-success{
    background:linear-gradient(135deg,var(--azul-sacramento),var(--azul-soft));
    border:none;
    border-radius:16px;
    color:white;
    font-weight:700;
    letter-spacing:.4px;
    transition:all .25s ease;
    box-shadow:0 8px 18px rgba(11,44,255,.35);
}

.btn-success:hover{
    transform:translateY(-2px) scale(1.02);
    box-shadow:0 12px 28px rgba(0,40,255,.55);
}

/* Botón pedir con icono */
.btn-pedir{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding: 1rem 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.btn {
    /* padding: 0.65rem 1rem;    */
    /* un poco más altos */
    font-size: 1.05rem;         /* ligeramente más grande */
    border-radius: 10px;        /* más moderno */
}   

.icon-canasta{
    width:26px;
    height:auto;
    filter:drop-shadow(0 2px 4px rgba(0,0,0,.35));
    transition:transform .3s ease;
}

/* Hover animado */
.btn-pedir:hover .icon-canasta{
    transform:rotate(-6deg) scale(1.7);
}

/* Botón consultar pedido */
.btn-outline-primary{
    border-radius:14px;
    border:2px solid var(--azul-sacramento);
    color:var(--azul-sacramento);
    font-weight:600;
}

.btn-outline-primary:hover{
    background:var(--azul-sacramento);
    color:white;
}

/* Modal */
.modal-content{
    border-radius:18px;
    border:none;
    box-shadow:0 15px 40px rgba(0,0,0,.25);
}

/* Alert */
.alert-info{
    /* background:#f0f3ff; */
     background: #f9fafb;
    border:1px solid rgba(0,40,255,.15);
    color:#001a99;
}

/* Map */
#map{
    border-radius:14px;
    box-shadow:0 6px 18px rgba(0,0,0,.15);
}

/* Detalles visuales */
img.rounded-4{
    border-radius:18px!important;
}

/* Texto rojo corporativo */
.text-danger{
    color:var(--rojo-acento)!important;
}

.label-direccion{
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-weight:600;
}



/* Contenedor troquita */
.truck-wrap{
    position: relative;
    display: inline-block;
    transform: translateX(-10px) translateY(10px);
}

/* Troquita */
.icon-troquita{
    width:54px;
    height:auto;
    margin-left:8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
    animation: truck-idle 2.2s ease-in-out infinite;
    position: relative;
    z-index: 2;
    
}

/* Vibración constante */
@keyframes truck-idle {
    0%   { transform: translate(0,0); }
    25%  { transform: translate(0.6px,-0.6px); }
    50%  { transform: translate(-0.6px,0.6px); }
    75%  { transform: translate(0.6px,0.6px); }
    100% { transform: translate(0,0); }
}


/* Polvo base */
.truck-dust{
    position:absolute;
    left:50px;
    top:50%;
    width:10px;              /* más grande */
    height:10px;
    background: rgba(120,120,120,.75);  /* más oscuro */
    border-radius:50%;
    transform: translateY(-50%);
    opacity:0;
    animation: dust-float 1.8s ease-out infinite;
    z-index:1;
    filter: blur(0.5px);     /* más realista */
}

/* Animación polvo */
@keyframes dust-float{
    0%{
        transform: translate(0,-50%) scale(0.5);
        opacity:0.8;
    }
    100%{
        transform: translate(26px,-50%) scale(2.2);  /* más expansión */
        opacity:0;
    }
}




/* Variaciones de partículas */
.truck-dust.d1{ animation-delay: 0s; }
.truck-dust.d2{ animation-delay: .5s; }
.truck-dust.d3{ animation-delay: 1s; }

/* Animación suave de aparición */
.precio-box{
    transition: all .25s ease;
}

.precio-box{
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    background: #f9fafb;
    text-align: center;
}

.precio-box strong{
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-top: 4px;
}

.precio-box small{
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
}
/* Cuando cambia el precio */
.precio-update{
    transform: scale(1.05);
    background: #e3f0ff !important;
}

/* Flash azul suave */
.precio-flash{
    animation: flashPrecio .35s ease;
}

@keyframes flashPrecio{
    0%{ background: #dbe5ff; }
    100%{ background: #eef2ff; }
}

.urgency-box {
  background: linear-gradient(135deg, #0b2cff, #3f5bff);
  background: linear-gradient(135deg, #0028FF, #1f3cff);
  color: white;
  padding: 18px 22px;
  border-radius: 14px;
  max-width: 420px;
  font-family: sans-serif;
  box-shadow: 0 10px 25px rgba(11, 44, 255, 0.35);
  animation: pulse 2.5s infinite;
}

.urgency-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.icon {
  font-size: 30px;
  animation: bounce 1.5s infinite;
}

.text strong {
  font-size: 18px;
  display: block;
}

.sub {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 4px;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.precio-mejorado{
    animation: mejorPrecio 0.5s ease;
    box-shadow: 0 0 0 3px rgba(11,44,255,.25);
}

@keyframes mejorPrecio{
    0%{ transform: scale(1); }
    50%{ transform: scale(1.08); }
    100%{ transform: scale(1); }
}

.planifica-box {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.planifica-text {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.planifica-text .sub-text {
    font-size: 0.9rem;
    color: #6b7280;
}



/* ========================= */
/* DATE CAROUSEL SACRAMENTO */
/* ========================= */

.date-carousel-wrapper{
    width:100%;
    position:relative;
}

/* Carrusel */
.date-carousel{
    display:flex;
    gap:12px;

    overflow-x:auto;
    overflow-y:hidden;

    padding:4px 4px 12px 4px;

    scroll-behavior:smooth;
    scroll-snap-type:x mandatory;

    -webkit-overflow-scrolling:touch;

    scrollbar-width:thin;
}

/* Scrollbar Chrome */
.date-carousel::-webkit-scrollbar{
    height:6px;
}

.date-carousel::-webkit-scrollbar-track{
    background:rgba(0,0,0,.05);
    border-radius:10px;
}

.date-carousel::-webkit-scrollbar-thumb{
    background:rgba(0,40,255,.35);
    border-radius:10px;
}

.date-carousel::-webkit-scrollbar-thumb:hover{
    background:rgba(0,40,255,.6);
}

/* Tarjeta de fecha */
.date-option{
    min-width:110px;
    flex:0 0 auto;

    padding:14px 10px;

    border-radius:14px;
    border:1px solid #e5e7eb;

    background:#fff;

    text-align:center;

    cursor:pointer;

    transition:all .22s ease;

    font-size:.85rem;

    display:flex;
    flex-direction:column;
    justify-content:center;

    scroll-snap-align:start;

    box-shadow:0 4px 10px rgba(0,0,0,.04);
}

/* Hover */
.date-option:hover{
    border-color:var(--azul-sacramento);
    transform:translateY(-2px);
    box-shadow:0 6px 16px rgba(0,40,255,.15);
}

/* Activo */
.date-option.active{
    background:linear-gradient(135deg,var(--azul-sacramento),var(--azul-soft));
    color:white;
    border-color:var(--azul-sacramento);
    transform:scale(1.05);
    box-shadow:0 8px 20px rgba(0,40,255,.35);
}

/* Texto del día */
.date-label{
    font-size:13px;
    min-height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    line-height:1.2;
}

/* Número grande */
.date-number{
    font-size:1.5rem;
    font-weight:800;
    margin-top:4px;
}

/* Estado seleccionado con glow */
.date-option.active .date-number{
    text-shadow:0 2px 6px rgba(0,0,0,.25);
}

/* Efecto tap móvil */
.date-option:active{
    transform:scale(.96);
}


#carouselFechas {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

/* ========================= */
/* BOTONES DEL CAROUSEL */
/* ========================= */

.date-carousel-wrapper{
    position:relative;
    display:flex;
    align-items:center;
}

/* Botones */
.carousel-btn{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    z-index:3;

    width:44px;
    height:44px;

    border-radius:50%;
    border:none;

    background:rgba(255,255,255,.95);
    box-shadow:0 4px 12px rgba(0,0,0,.15);

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:32px;
    font-weight:700;
    color:var(--azul-sacramento);

    cursor:pointer;
    transition:all .2s ease;
    line-height:1;
}

/* Hover */
.carousel-btn:hover{
    background:var(--azul-sacramento);
    color:white;
    transform:translateY(-50%) scale(1.08);
}
.carousel-btn span{
    line-height:1;
    transform:translateY(-5px);
}
/* Posición */
.carousel-btn.left{
    left:-8px;
}

.carousel-btn.right{
    right:-8px;
}

/* Carrusel deja espacio para botones */
.date-carousel{
    padding:4px 32px 12px 32px;
}


/* ========================= */
/* Welcome Box Sacramento   */
/* ========================= */

.welcome-box{
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    background: #f9fafb;
    margin-bottom: 16px;
}

.welcome-content{
    text-align: center;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}



.cliente-box{
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    background: #f9fafb;
    margin-bottom: 16px;
}

.cliente-content{
    text-align: center;
}

.cliente-label{
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    margin-bottom: 8px;
}

.cliente-input{
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 2px;
    outline: none;
    width: 160px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.cliente-input:focus{
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}



.precio-box{
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    background: #f9fafb;
    text-align: center;
}

.precio-total{
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}

.precio-unitario{
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 6px;
}

.precio-cajas{
    margin-top: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--azul-sacramento);
    background: rgba(0,40,255,.06);
    padding: 12px 14px;
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* icono grande y sobresaliente */
.caja-icono{
    font-size: 1.8rem;   /* casi el doble */
    line-height: 1;
    transform: translateY(-6px); /* lo hace sobresalir */
}





.precio-micro{
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #065f46;
    background: rgba(16,185,129,.08);
    padding: 8px 12px;
    border-radius: 8px;
    animation: fadeInUp .3s ease;
}


.precio-ahorro{
    margin-left: 10px;
    font-weight: 600;
    color: #16a34a;
}



.precio-ahorro{
    margin-top: 6px;
    font-weight: 600;
    color: #16a34a;
    display: flex;
    flex-direction: column;
    align-items: center;   
    text-align: center;     
    gap: 4px;
    width: 100%;           
}

.huevos-iconos{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;   
    gap: 2px;
}

.huevo{
    font-size: 20px;
}


.cantidad-selector{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.btn-cantidad{
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow: 6px 6px 12px rgba(0,0,0,0.08),
                -6px -6px 12px rgba(255,255,255,0.8);
    transition: all .15s ease;
    cursor: pointer;
}

.btn-cantidad:active{
    transform: scale(0.92);
    box-shadow: inset 4px 4px 8px rgba(0,0,0,0.1);
}

.cantidad-display{
    width: 80px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    background: transparent;
}

.precio-cajas{
    margin-top:10px;
    text-align:center;
    font-size:14px;
    background:#f8f9fa;
    padding:10px;
    border-radius:8px;
    border:1px solid #e9ecef;
}

.modo-caja-texto{
    font-weight:500;
    color:#555;
}

.modo-caja-detalle{
    margin-top:4px;
    font-size:15px;
    color:#2e7d32;
}



.time-picker{
    height:160px;
    overflow-y:auto;
    border:1px solid #e5e7eb;
    border-radius:12px;
    position:relative;
    background:white;
}

.time-option{
    text-align:center;
    padding:14px;
    font-size:16px;
    cursor:pointer;
    color:#666;
}

.time-option.active{
    font-weight:600;
    color:#000;
    background:#f1f5f9;
}

.time-picker::after{
    content:"";
    position:absolute;
    top:50%;
    left:0;
    width:100%;
    height:40px;
    transform:translateY(-50%);
    border-top:2px solid #0d6efd;
    border-bottom:2px solid #0d6efd;
    pointer-events:none;
}