@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:#f4f7fa;
  font-family:'Inter', Arial, sans-serif;
  color:#1f2937;
}

#pedido-helados-app{
  width:100%;
}

#pedido-helados-app *{
  box-sizing:border-box;
}

/* BARRA SUPERIOR */
.top-bar{
  width:100%;
  background:#ffffff;
  padding:14px 18px;
  border-bottom:1px solid #e5e7eb;
  position:sticky;
  top:0;
  z-index:1000;
  display:flex;
  align-items:center;
  gap:12px;
}

.volver-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  font-weight:700;
  color:#1f3b4d;
  background:#f4f7f9;
  border:1px solid #d7e0e7;
  padding:10px 16px;
  border-radius:12px;
  transition:all 0.2s ease;
}

.volver-btn:hover{
  background:#1f3b4d;
  color:#ffffff;
  border-color:#1f3b4d;
}

.titulo-app{
  font-weight:700;
  color:#1f3b4d;
  font-size:18px;
}

.pedido-wrap{
  width:100%;
  max-width:1240px;
  margin:0 auto;
  padding:20px 16px 40px;
  overflow:visible;
}

/* HERO */
.pedido-hero{
  background:linear-gradient(135deg,#1f4e5f 0%, #2f6b7d 100%);
  border:1px solid #356f81;
  border-radius:22px;
  padding:22px;
  margin-bottom:14px;
  box-shadow:0 14px 28px rgba(31,78,95,0.14);
}

.pedido-hero h2{
  margin:0 0 8px;
  font-size:28px;
  line-height:1.12;
  color:#fff;
}

.pedido-hero p{
  margin:0;
  font-size:15px;
  line-height:1.55;
  color:#eaf3f8;
}

.pedido-note{
  margin-top:14px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,0.15);
  border-radius:14px;
  background:rgba(255,255,255,0.08);
  font-size:13px;
  line-height:1.5;
  color:#f8fbfd;
}

/* RESUMEN */
.resumen-sticky{
  position: sticky;
  top: 76px;
  z-index: 900;
  margin: 0 0 14px 0;
  padding: 10px 14px;
  border-radius: 0 0 14px 14px;
  background: #ffffff;
  border: 1px solid #dbe5ec;
  box-shadow: 0 8px 20px rgba(31,41,55,0.08);
  font-size: 14px;
  font-weight: 800;
  color: #1f4e5f;
}

/* FORM */
.pedido-card{
  background:#fff;
  border:1px solid #dce5ec;
  border-radius:20px;
  padding:20px;
  margin-bottom:18px;
  box-shadow:0 10px 20px rgba(31,41,55,0.05);
}

.pedido-card h3{
  margin:0 0 16px;
  font-size:20px;
  color:#21475d;
}

.pedido-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(280px,0.8fr);
  gap:18px;
  align-items:start;
}

.pedido-fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.pedido-field-full{
  grid-column:1 / -1;
}

.pedido-label{
  display:block;
  margin-bottom:6px;
  font-size:13px;
  font-weight:700;
  color:#475569;
}

.pedido-input,
.pedido-select,
.pedido-textarea{
  width:100%;
  border:1px solid #d5dee6;
  border-radius:14px;
  background:#fff;
  padding:12px 14px;
  font-size:14px;
  color:#1f2937;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}

.pedido-input::placeholder,
.pedido-textarea::placeholder{
  color:#94a3b8;
}

.pedido-input:focus,
.pedido-select:focus,
.pedido-textarea:focus,
.qty-input:focus{
  border-color:#5b93a6;
  box-shadow:0 0 0 4px rgba(91,147,166,0.14);
}

.pedido-textarea{
  min-height:100px;
  resize:vertical;
}

.pedido-help{
  background:linear-gradient(180deg,#f7fbfd 0%,#edf4f7 100%);
  border:1px solid #d9e5eb;
  border-radius:16px;
  padding:15px;
  font-size:14px;
  line-height:1.7;
  color:#4b5f70;
}

/* LISTA */
.linea-box{
  background:#fff;
  border:1px solid #dce6ed;
  border-radius:22px;
  margin-bottom:18px;
  overflow:hidden;
  box-shadow:0 10px 20px rgba(31,41,55,0.05);
}

.linea-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:18px 24px 14px;
  border-bottom:1px solid #e5edf3;
  background:linear-gradient(180deg,#fff 0%,#f7fafc 100%);
}

.linea-title{
  margin:0;
  font-size:22px;
  line-height:1.2;
  color:#1f2f3d;
}

.linea-sub{
  margin:4px 0 0;
  font-size:13px;
  line-height:1.4;
  color:#6b7f90;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  white-space:nowrap;
}

.badge.baccio{
  background:#dff2ea;
  color:#226a52;
}

.badge.cremhaus{
  background:#e7eefb;
  color:#315d9a;
}

.fila-simple{
  padding:0 24px;
  border-bottom:1px solid #edf3f7;
  transition:background .18s ease;
}

.fila-simple:nth-child(even){
  background:#fbfdfe;
}

.fila-simple:nth-child(odd){
  background:#fff;
}

.fila-simple:hover{
  background:#f6fbfd;
}

.fila-simple:last-child{
  border-bottom:none;
}

.fila-simple-top{
  display:block;
  min-height:auto;
  padding:12px 0;
}

.fila-simple-texto{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  min-width:0;
  line-height:1.45;
  font-size:15px;
  margin-bottom:10px;
}

.fila-sabor{
  font-weight:800;
  color:#1f2937;
  font-size:17px;
  letter-spacing:-0.01em;
}

.fila-marca{
  color:#607587;
  font-weight:600;
}

.fila-tipo{
  color:#2e7d5b;
  font-weight:700;
}

.fila-marca::after{
  content:" · ";
  color:#9aa9b8;
}

.fila-simple-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.desc-toggle{
  margin:0;
  padding:6px 12px;
  border-radius:999px;
  background:#e8f3ff;
  color:#2563eb;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  line-height:1;
  white-space:nowrap;
  transition:all .2s ease;
  border:1px solid #c7ddff;
}

.desc-toggle:hover{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
  transform:translateY(-1px);
  box-shadow:0 6px 12px rgba(37,99,235,0.2);
}

.desc-box{
  margin:10px 0 0 0;
  padding:12px 14px;
  max-width:780px;
  background:#f7fbfd;
  border:1px solid #dbe8ef;
  border-left:4px solid #5b93a6;
  border-radius:12px;
  font-size:13px;
  line-height:1.55;
  color:#4f6373;
}

.sabor-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  flex-shrink:0;
}

.qty-wrap{
  display:grid;
  grid-template-columns:42px 62px 42px;
  gap:10px;
  align-items:center;
  justify-content:end;
}

.qty-btn{
  width:42px;
  height:42px;
  border:1px solid #d8e3ea;
  border-radius:14px;
  background:#fff;
  color:#36566b;
  font-size:22px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(31,41,55,0.05);
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.qty-btn:hover{
  background:#eef7fb;
  color:#1f4e5f;
  border-color:#c8dce7;
  box-shadow:0 8px 18px rgba(47,107,125,0.10);
  transform:translateY(-1px);
}

.qty-btn:active{
  transform:scale(.97);
}

.qty-input{
  width:62px;
  height:42px;
  border:1px solid #d7e0e8;
  border-radius:14px;
  background:#fff;
  text-align:center;
  font-size:15px;
  font-weight:800;
  color:#1f2937;
  outline:none;
  appearance:textfield;
  -moz-appearance:textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

.pedido-footer{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}

.pedido-btn{
  border:none;
  border-radius:14px;
  padding:13px 18px;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.pedido-btn:hover{
  transform:translateY(-1px);
}

.pedido-btn-primary{
  background:#2bb673;
  color:#fff;
  box-shadow:0 10px 20px rgba(43,182,115,0.16);
}

.pedido-btn-secondary{
  background:#edf3f7;
  color:#36566b;
}

.pedido-mini{
  width:100%;
  font-size:13px;
  color:#708293;
}

/* TABLET */
@media (max-width:980px){
  .pedido-grid{
    grid-template-columns:1fr;
  }
}

/* MOBILE */
@media (max-width:768px){
  .top-bar{
    padding:10px 12px;
    flex-direction:column;
    align-items:stretch;
  }

  .volver-btn{
    width:100%;
    justify-content:center;
    font-size:14px;
    padding:10px 14px;
  }

  .titulo-app{
    text-align:center;
    font-size:16px;
  }
}

@media (max-width:700px){
  body{
    background:#f3f6f9;
  }

  .pedido-wrap{
    padding:10px 8px 30px;
  }

  .pedido-hero{
    padding:16px 14px;
    border-radius:18px;
    margin-bottom:14px;
  }

  .pedido-hero h2{
    font-size:19px;
  }

  .pedido-hero p{
    font-size:14px;
  }

  .pedido-note{
    margin-top:12px;
    font-size:12px;
    padding:10px 12px;
  }

  .resumen-sticky{
  top: 92px;
  z-index: 900;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 0 0 12px 12px;
  margin-bottom: 12px;
}

  .pedido-card{
    padding:14px;
    border-radius:18px;
    margin-bottom:14px;
  }

  .pedido-card h3{
    font-size:17px;
    margin-bottom:14px;
  }

  .pedido-fields{
    grid-template-columns:1fr;
    gap:12px;
  }

  .pedido-help{
    font-size:13px;
    line-height:1.6;
  }

  .linea-box{
    border:none;
    box-shadow:none;
    background:transparent;
    margin-bottom:12px;
  }

  .linea-head{
    padding:8px 4px 12px;
    background:transparent;
    border-bottom:none;
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .linea-title{
    font-size:18px;
  }

  .linea-sub{
    font-size:12px;
  }

  .badge{
    align-self:flex-start;
    font-size:11px;
    padding:9px 12px;
  }

  .fila-simple{
    background:#fff !important;
    border:1px solid #dde7ee;
    border-radius:18px;
    padding:14px 14px 12px;
    margin-bottom:12px;
    box-shadow:0 8px 18px rgba(31,41,55,0.05);
  }

  .fila-simple:last-child{
    border-bottom:1px solid #dde7ee;
  }

  .fila-simple-top{
    padding:0;
  }

  .fila-simple-texto{
    display:block;
    padding:0;
    margin:0 0 10px 0;
    font-size:14px;
    line-height:1.45;
  }

  .fila-sabor{
    display:block;
    font-size:15px;
    margin-bottom:6px;
  }

  .fila-marca,
  .fila-tipo{
    display:inline;
    font-size:13px;
  }

  .fila-simple-bottom{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
  }

  .desc-toggle{
    padding:0;
    background:none;
    border:none;
    box-shadow:none;
    color:#2f6b7d;
    font-size:13px;
    font-weight:700;
    border-radius:0;
  }

  .desc-toggle:hover{
    background:none;
    color:#1f4e5f;
    transform:none;
    box-shadow:none;
  }

  .desc-box{
    margin:10px 0 0 0;
    max-width:none;
    font-size:13px;
  }

  .sabor-actions{
    width:auto;
    margin-top:0;
  }

  .qty-wrap{
    grid-template-columns:42px 60px 42px;
    gap:8px;
  }

  .qty-btn{
    width:42px;
    height:42px;
    border-radius:999px;
    font-size:22px;
  }

  .qty-input{
    width:60px;
    height:42px;
    font-size:16px;
    border-radius:999px;
  }

  .pedido-footer{
    flex-direction:column;
    align-items:stretch;
  }

  .pedido-btn{
    width:100%;
  }
}