* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", system-ui, sans-serif;
}
html {
  scroll-behavior: smooth;
}
/* =========================
   NAVBAR GENERAL
========================= */
.navbar {
  background: #ffffff;
  padding: 18px 16px 0;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid #f0f0f0;
}

/* =========================
   TOP NAVBAR
========================= */
.navbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}

.brand-text p {
  font-size: 0.85rem;
  color: #777;
}

/* =========================
   INFO ENTREGA
========================= */
.navbar-info {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #555;
}

.a {
  text-decoration: none;
}
.estado-container {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  text-align: right;
}

.estado-indicador.abierto {
  color: #22c55e;
  font-weight: 600;
}

.estado-indicador.cerrado {
  color: #ef4444;
  font-weight: 600;
}

.estado-contador {
  font-size: 0.75rem;
  opacity: 0.8;
}
/* =========================
   BARRA DE CATEGORÍAS (STICKY)
========================= */
.categories-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  left: 0;
  width: 100%;
  background: #ffffff;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.icon-btn {
  border: none;
  background: #f5f5f5;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.categories {
  list-style: none;
  display: flex;
  gap: 10px;
}

.categories li {
  padding: 8px 14px;
  border-radius: 20px;
  background: #f5f5f5;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: #333;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.categories li:hover {
  background: #ececec;
}

.categories li.active {
  background: #ff4d00;
  color: #ffffff;
}

section {
  padding: 25px 8px;
  scroll-margin-top: 120px;
}

section + section {
  margin-top: 20px;
}

/* =========================
   GRID DE PRODUCTOS
========================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.product-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.product-card:hover {
  transform: translateY(-2px);
}

.product-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
}

.product-info p {
  font-size: 0.85rem;
  color: #777;
  margin: 6px 0;
}

.product-info .price {
  font-weight: 700;
  color: #000;
}

.product-card img {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
}

.add-btn {
  margin-top: 8px;
  padding: 6px 12px;
  border: none;
  background: #ff4d00;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s ease;
}

.add-btn:hover {
  background: #e84300;
}

.sabores-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.sabor-btn {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.sabor-btn:hover {
  border-color: #ff6600;
  color: #ff6600;
}

.sabor-btn.active {
  background: #ff6600;
  color: white;
  border-color: #ff6600;
}
/* =========================
   MODAL
========================= */
.modal {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: none;
  z-index: 9999;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  height: 100vh;
  padding: 30px;
  overflow-y: auto;
  border-radius: 0;
  animation: fadeIn 0.2s ease;
}

/* NUEVO LAYOUT 2 COLUMNAS */
.modal-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 40px;
  align-items: start;
}

/* IMAGEN */
.modal-image {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* BOTONES BAJO IMAGEN */
.image-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.image-actions button {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border-radius: 10px;
}

/* ADICIONES */
#extrasContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

/* TARJETA INDIVIDUAL */

.extra-item {
  background: #fafafa;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #f1f1f1;
  transition: 0.2s ease;
}

.extra-item:hover {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

textarea {
  width: 100%;
  height: 90px;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid #e5e5e5;
  padding: 12px;
  resize: none;
  transition: 0.2s ease;
}

textarea:focus {
  border-color: #ff5a00;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.15);
}

.quantity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.invoiceDetailsA {
  color: #ff6600;
  text-decoration: none;
  font-weight: 600;
}

.privacy-check a:hover {
  text-decoration: underline;
}
.quantity button {
  width: 34px;
  height: 34px;
  border: none;
  background: #ff4d00;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

/* FOOTER FIJO */
.modal-footer {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  padding: 20px 25px;
  border-top: 1px solid #eee;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.modal-total {
  font-size: 20px;
  font-weight: 700;
  margin-top: 15px;
  color: #111;
}
#confirmAdd {
  width: 100%;
  padding: 14px;
  margin-top: 15px;
  background: linear-gradient(135deg, #ff4d00, #ff7a00);
  border: none;
  color: white;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s ease;
}

#confirmAdd:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 77, 0, 0.3);
}
#closeModal {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border: none;
  background: #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
}
/* ============================= */
/* CARRITO */
/* ============================= */

.cart-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ff4d00;
  color: white;
  padding: 12px 16px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  z-index: 10000;
}
.cart-icon:hover {
  transform: translateY(-2px);
  background: #ff4d60;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.cart-icon span {
  background: white;
  color: #ff4d00;
  padding: 2px 6px;
  border-radius: 50%;
  margin-left: 6px;
}
.cart-icon button:hover {
  transform: scale(1.08);
}

.cart-panel {
  position: fixed;
  right: -400px;
  top: 0;
  width: 320px;
  height: 100%;
  background: white;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.cart-panel.active {
  right: 0;
}

.cart-panel button {
  width: 100%;
  padding: 10px;
  background: #25d366;
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

.cart-panel input,
.cart-panel textarea {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 0.9rem;
}

.cart-panel textarea {
  height: 60px;
  resize: none;
}

/* ============================= */
/* FORMULARIO */
/* ============================= */

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  transition: 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #ff4d4d;
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.2);
}

#costo-domicilio {
  font-weight: bold;
  color: #ff4d4d;
  font-size: 16px;
}

/* CONTROLES MÁS COMPACTOS */
.extra-qty-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1%;
}

.extra-qty-controls button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #ff5a00, #ff7a00);
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s ease;
}

.extra-qty-controls button:hover {
  transform: scale(1.08);
}

.extra-qty {
  font-weight: 600;
  font-size: 14px;
  min-width: 20px;
  text-align: center;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
  #extrasContainer {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  #extrasContainer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .modal-layout {
    grid-template-columns: 1fr;
  }

  .modal-image {
    height: 120px;
  }
}

/* =========================
   ANIMACIONES
========================= */
@keyframes fadeIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/* ========================================= */
/* =============== RESPONSIVE ============== */
/* ========================================= */

/* ---------- TABLET Y MOBILE ---------- */

@media (max-width: 768px) {
  /* GRID PRODUCTOS */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-card {
    padding: 16px;
  }

  .product-card img {
    height: 150px;
    width: 150px;
    object-fit: cover;
  }

  /* MODAL FULL SCREEN */
  .modal {
    padding: 0;
  }

  .modal-content {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    border-radius: 0;
  }

  /* IMAGEN ARRIBA */
  .modal-left {
    width: 100%;
  }

  .modal-left img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 14px;
  }

  /* CONTENIDO DERECHA ABAJO */
  .modal-right {
    width: 100%;
    margin-top: 20px;
  }

  /* EXTRAS MÁS COMPACTOS */
  .extra-item {
    padding: 10px 0;
    font-size: 14px;
  }

  .extra-info {
    font-size: 14px;
  }

  .extra-qty-controls button {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .extra-qty {
    font-size: 14px;
    min-width: 20px;
    text-align: center;
  }

  /* CONTROLES DE CANTIDAD */
  #plusQty,
  #minusQty {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  #productQty {
    font-size: 16px;
    margin: 0 10px;
  }

  /* TOTAL */
  #modalTotal {
    font-size: 18px;
    font-weight: bold;
  }

  /* BOTÓN AGREGAR */
  .add-to-cart-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 10px;
  }

  /* CARRITO FLOTANTE */
  .cart-icon {
    bottom: 15px;
    right: 15px;
    width: 100px;
    height: 50px;

    font-size: 20px;
  }

  .cart-icon span {
    font-size: 12px;
  }
  .categories-bar {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 14px;
    min-width: max-content;
  }

  .categories li {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Ocultar scrollbar visual */
  .categories-bar::-webkit-scrollbar {
    display: none;
  }
  .categories-bar {
    scrollbar-width: none;
  }
}

@media (max-width: 320px) {
  .modal-content {
    padding: 15px;
  }

  .modal-left img {
    max-height: 200px;
  }

  .product-card img {
    height: 150px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 16px;
  }

  .extra-item {
    font-size: 13px;
  }

  .extra-qty-controls button {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  #plusQty,
  #minusQty {
    width: 32px;
    height: 32px;
  }

  .cart-icon {
    width: 100px;
    height: 50px;
  }
  /* ============================= */
  /* NAVBAR RESPONSIVE MOBILE */
  /* ============================= */

  .categories-bar {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 14px;
    min-width: max-content;
  }

  .categories li {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Ocultar scrollbar visual */
  .categories-bar::-webkit-scrollbar {
    display: none;
  }
  .categories-bar {
    scrollbar-width: none;
  }
}
@media (max-width: 480px) {
  .privacy-check {
    font-size: 13px;
  }
}
/* ---------- MÓVILES PEQUEÑOS ---------- */
@media (max-width: 480px) {
  .modal-content {
    padding: 15px;
  }

  .modal-left img {
    max-height: 200px;
  }

  .product-card img {
    height: 150px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 16px;
  }

  .extra-item {
    font-size: 13px;
  }

  .extra-qty-controls button {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  #plusQty,
  #minusQty {
    width: 32px;
    height: 32px;
  }

  .cart-icon {
    width: 100px;
    height: 50px;
  }
  /* ============================= */
  /* NAVBAR RESPONSIVE MOBILE */
  /* ============================= */

  .categories-bar {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 14px;
    min-width: max-content;
  }

  .categories li {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Ocultar scrollbar visual */
  .categories-bar::-webkit-scrollbar {
    display: none;
  }
  .categories-bar {
    scrollbar-width: none;
  }
}

/* ===================================== */
/* RESPONSIVE MODAL - IMAGEN ARRIBA REAL */
/* ===================================== */

@media (max-width: 1024px) {
  /* Fuerza columna normal (NO reverse) */
  .modal-layout {
    display: flex;
    flex-direction: column !important;
  }

  /* Imagen SIEMPRE primero */
  .modal-left {
    order: 1;
    width: 100%;
  }

  /* Contenido después */
  .modal-right {
    order: 2;
    width: 100%;
  }

  /* Imagen estilos */
  .modal-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 16px;
  }

  /* Botones debajo de imagen */
  .image-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }
  /* ============================= */
  /* NAVBAR RESPONSIVE MOBILE */
  /* ============================= */

  .categories-bar {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 14px;
    min-width: max-content;
  }

  .categories li {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Ocultar scrollbar visual */
  .categories-bar::-webkit-scrollbar {
    display: none;
  }
  .categories-bar {
    scrollbar-width: none;
  }
}
