:root{
  --bg: #0f1724;
  --card: rgba(26, 22, 66, 0.661);
  --accent: #ff6b35;
  --text: #f7fafc;
  --header-height: 72px; /* default header height for layout spacing */
}

*{box-sizing:border-box}
 
html,body{
   
    height:100%;
    margin:0;
    font-family:Inter,Segoe UI,Arial,sans-serif;
    color:var(--text);
}

body::before{
  content: "";
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  z-index: -1;
  background: linear-gradient(180deg, rgba(255,229,0,1) 0%, rgb(255, 149, 0) 70%);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

main{min-height:100vh;  justify-content:center;  padding: 1rem 1rem; display:flex; flex-direction:column; align-items:center}

.main-box{
    
    display:flex;
    flex-direction:column;
    gap:1.5rem;
}

.encabezado-inter{
    margin-bottom: 1rem;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    max-width:980px;
    width:100%;
    margin: 0 auto 1rem auto;
    padding:0.5rem 0.75rem;
    background: linear-gradient(180deg, rgb(240, 140, 1), rgb(255, 196, 0));
    backdrop-filter: blur(6px);
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.28);
    white-space: nowrap;
    overflow: hidden;
    /* expose actual header height to layout (keeps main padded) */
    --header-height:72px;
}

#encabezado-img{
  width: 64px;
  height:64px;
  background-color: var(--text);
  border-radius: 50%;
  padding:8px;
  display:inline-block;
}

.encabezado-inter h2{
  font-size:1.25rem;
  margin:0;
  color:var(--text);
  font-weight:600;
  display:flex;
  align-items:center;
  gap:0.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caja-restaurante{
    align-items: center;
    text-align: center;
    max-width:980px;
    width:100%;
    background: var(--card);
    border-radius:16px;
    padding:1rem;
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
    margin:0 auto;
    box-shadow: 0 8px 20px rgba(38, 37, 37, 0.988);
    border:1px solid rgba(255,255,255,0.04);
  overflow: hidden;
}

#platos-imagenes{
    width: 100%;
    border-radius:12px;
    display:block;
    object-fit:cover;
}

/* Desktop: arrange image and content side-by-side and make image scale to card height */
@media (min-width:900px){
  .caja-restaurante{
    grid-template-columns: 40% 60%;
    align-items:stretch;
    padding:0; /* let image touch edges */
    gap:0;
    border-radius:16px;
  }

  .caja-restaurante #platos-imagenes{
    width:100%;
    height:100%;
    min-height:260px;
    max-height:60vh;
    object-fit:cover;
    border-radius:0; /* rounded corners handled by card */
    display:block;
  }

  /* Content column: use a single content wrapper and align actions to bottom */
  .card-content{
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    padding:1.25rem;
    height:100%;
    box-sizing:border-box;
  }

  .card-meta{ text-align:left }

  .botones-distri{ display:flex; gap:0.75rem; align-items:center; justify-content:flex-start }

  .caja-restaurante h3{margin-top:0}

  .boton1{max-width:260px}
}

@media (min-width:1400px){
  .caja-restaurante{grid-template-columns:35% 65%}
  .caja-restaurante #platos-imagenes{max-height:70vh}
}

.caja-restaurante h3{margin:0; color:var(--accent); font-size:1.25rem}
.caja-restaurante p{margin:0.35rem 0 0.6rem; color: rgba(247,250,252,0.9)}

.boton1{
    margin: 10px 0 0;
    width: 100%;
    max-width:200px;
    background:var(--accent);
    color:#fff;
    border:none;
    padding:0.75rem 1.2rem;
    border-radius:12px;
    font-size:1rem;
    font-weight: 600;
    cursor:pointer;
    display:inline-flex;
    gap:0.5rem;
    align-items:center;
    justify-content:center;
    transition:transform 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 6px 12px rgba(0,0,0,0.18);
}

.boton1 svg{display:inline-block}
.boton1:hover{transform:translateY(-2px); box-shadow: 0 10px 18px rgba(0,0,0,0.28)}

@media (min-width:700px){
  .caja-restaurante{grid-template-columns: 1fr 2fr; align-items:center}
  #platos-imagenes{height:220px}
}

@media (max-width:420px){
  .encabezado-inter h2{font-size:1.15rem}
}

.restaurantes-wrapper{
  width:100%;
  max-width:1200px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap:1.25rem;
  justify-content:center;
  padding:0.75rem 0.5rem 2rem;
  box-sizing:border-box;
}

/* Make sure each card is full-width in its grid cell but limited for readability */
.restaurantes-wrapper .caja-restaurante{max-width:720px; margin:0 auto}

/* Responsive tweaks */
@media (max-width:900px){
  :root{--header-height:64px}
  .restaurantes-wrapper{grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:1rem}
  .boton1{max-width:220px}
}

@media (max-width:480px){
  :root{--header-height:56px}
  main{padding: calc(var(--header-height) + 0.75rem) 0.75rem 1.25rem}
  .restaurantes-wrapper{grid-template-columns:1fr; padding:0.5rem}
  .encabezado-inter{padding:0.4rem 0.6rem}
  #encabezado-img{width:48px; height:48px}
  .encabezado-inter h2{font-size:1rem}
  .boton1{max-width:180px}
}

@media (min-width:1200px){
  .restaurantes-wrapper{grid-template-columns:repeat(2, 1fr)}
  .caja-restaurante{width:100%}
}