/* ============================================================
   style.css - Restaurante La Mansión
   ============================================================ */

:root {
  --vino:        hsl(0, 71%, 34%);
  --vino-oscuro: #3d1f1f;
  --vino-noche:  #241313;
  --dorado:      #d4a017;
  --dorado-dark: #b8860b;
  --crema:       #f8f5f0;
  --texto:       #333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: var(--crema);
  color: var(--texto);
}

/* ---------------- HEADER ---------------- */
header {
  background: var(--vino);
  color: #fff;
  padding: 25px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

header h1 { font-size: 26px; }

nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
  font-weight: bold;
  transition: color .2s;
}
nav a:hover { color: var(--dorado); }

/* ---------------- HERO ---------------- */
.hero {
  min-height: 420px;
  background:
    linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)),
    url("https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?auto=format&fit=crop&w=1600&q=80")
    center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 30px;
}

.hero h2 { font-size: 48px; margin-bottom: 15px; }
.hero p  { font-size: 20px; margin-bottom: 25px; }

/* ---------------- BOTONES ---------------- */
.btn {
  display: inline-block;
  background: var(--dorado);
  color: #fff;
  border: none;
  padding: 13px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  transition: background .2s, transform .1s;
}
.btn:hover    { background: var(--dorado-dark); }
.btn:active   { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------------- SECCIONES ---------------- */
section { padding: 60px 8%; }

section h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--vino);
  font-size: 32px;
}

/* ---------------- FILTROS ---------------- */
.filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.filtros:last-of-type { margin-bottom: 35px; }

.filtros-label {
  font-weight: bold;
  color: var(--vino);
  font-size: 15px;
}

.chip {
  background: #fff;
  border: 2px solid #e0d6c8;
  color: var(--vino);
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all .2s;
}

.chip:hover { border-color: var(--dorado); }

.chip.activo {
  background: var(--vino);
  border-color: var(--vino);
  color: #fff;
}

/* ---------------- MENÚ ---------------- */
.menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 25px;
}

.plato {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.plato:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .15);
}

.plato img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.plato-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tag {
  align-self: flex-start;
  background: #f3e9d2;
  color: var(--vino);
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
}

.plato-info h3 {
  color: var(--vino);
  margin-bottom: 8px;
  font-size: 18px;
}

.plato-info p {
  color: #666;
  margin-bottom: 12px;
  min-height: 40px;
  font-size: 14px;
}

.precio {
  font-size: 20px;
  font-weight: bold;
  color: var(--texto);
  margin-bottom: 15px;
  margin-top: auto;
}

.btn-agregar { width: 100%; }

/* ---------------- CARRITO ---------------- */
.pedido-container {
  max-width: 900px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
}

#carrito { margin-top: 20px; }

#carrito .vacio {
  color: #999;
  text-align: center;
  padding: 20px 0;
}

.item-carrito {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #eee;
  padding: 14px 0;
}

.item-info { display: flex; flex-direction: column; gap: 3px; }
.item-info strong { color: var(--vino); }
.item-info span   { font-size: 13px; color: #888; }

.item-controles {
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-controles button {
  background: var(--vino);
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.item-controles button:hover { background: var(--dorado); }
.item-controles .cant { font-weight: bold; min-width: 20px; text-align: center; }

.item-subtotal { font-weight: bold; min-width: 90px; text-align: right; }

.btn-eliminar {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-eliminar:hover { background: #96281b; }

.total {
  text-align: right;
  font-size: 22px;
  font-weight: bold;
  margin-top: 20px;
  color: var(--vino);
  border-top: 2px dashed #e0d6c8;
  padding-top: 15px;
}

/* ---------------- FORMULARIOS ---------------- */
form {
  max-width: 700px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
}

.pedido-container form {
  box-shadow: none;
  padding: 0;
  margin-top: 25px;
  max-width: 100%;
}

.form-group { margin-bottom: 18px; }

label {
  display: block;
  margin-bottom: 7px;
  font-weight: bold;
  font-size: 15px;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 7px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--dorado);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, .15);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.radios { display: flex; gap: 20px; flex-wrap: wrap; }

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  background: var(--crema);
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
}
.radio:hover { border-color: var(--dorado); }
.radio input { width: auto; }

/* ---------------- MENSAJES ---------------- */
.mensaje {
  margin-top: 15px;
  padding: 14px;
  border-radius: 7px;
  display: none;
  line-height: 1.6;
  font-size: 15px;
}

.mensaje.ok {
  display: block;
  background: #d4edda;
  color: #155724;
  border-left: 5px solid #28a745;
}

.mensaje.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border-left: 5px solid #dc3545;
}

/* ---------------- TOAST ---------------- */
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--vino);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
  opacity: 0;
  transition: all .3s;
  z-index: 999;
}
#toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---------------- CONTACTO ---------------- */
.contacto {
  text-align: center;
  background: var(--vino-oscuro);
  color: #fff;
}
.contacto h2 { color: var(--dorado); }
.contacto p  { margin: 8px 0; font-size: 17px; }

footer {
  background: var(--vino-noche);
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 700px) {
  header { flex-direction: column; gap: 15px; }
  nav a  { margin: 0 7px; }
  .hero h2 { font-size: 35px; }
  .hero p  { font-size: 17px; }
  section  { padding: 45px 5%; }
  section h2 { font-size: 26px; }

  .item-carrito {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "info    info"
      "controles subtotal"
      "eliminar eliminar";
  }
  .item-info     { grid-area: info; }
  .item-controles{ grid-area: controles; }
  .item-subtotal { grid-area: subtotal; }
  .btn-eliminar  { grid-area: eliminar; width: 100%; }
}
nav a.admin-link {
  background: rgba(255,255,255,.15);
  padding: 8px 14px;
  border-radius: 6px;
  margin-left: 12px;
}
nav a.admin-link:hover { background: #ffd166; color: var(--vino); }

.check-decoracion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff5e0;
  border: 2px dashed var(--dorado);
  padding: 15px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: normal;
  transition: all .2s;
}
.check-decoracion:hover { background: #ffefcc; }
.check-decoracion input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--dorado); }
.check-decoracion strong { color: var(--vino); }
.check-decoracion small  { display: block; color: #888; font-size: 12px; margin-top: 3px; }