/* ==========================================
   HUEVOS AIRES - IDENTIDAD VISUAL RÚSTICA DE GRANJA
   ========================================== */
:root {
  --farm-bg: #130a06;
  --farm-card: rgba(28, 16, 11, 0.9);
  --farm-border: rgba(245, 158, 11, 0.25);
  --farm-border-glow: rgba(245, 158, 11, 0.5);
  --gold-egg: #f59e0b;
  --red-poncho: #dc2626;
  --red-poncho-dark: #991b1b;
  --cream-white: #fef3c7;
  --text-main: #f8fafc;
  --text-muted: #a8a29e;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--farm-bg);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(220, 38, 38, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(245, 158, 11, 0.08) 0%, transparent 40%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* HEADER CON FOTO DE PORTADA OFICIAL */
.farm-header {
  background: linear-gradient(180deg, #1f110a 0%, #130a06 100%);
  border-bottom: 2px solid var(--farm-border);
  padding: 2rem 1rem 1.5rem;
  text-align: center;
  position: relative;
}

.farm-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-egg), var(--red-poncho), transparent);
}

.header-brand-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.farm-logo-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-egg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 158, 11, 0.3);
}

.farm-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.farm-title span {
  color: var(--gold-egg);
}

.farm-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--red-poncho);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.farm-contact-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.farm-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.farm-contact-item a {
  color: var(--cream-white);
  text-decoration: none;
  font-weight: 600;
}

/* BANNER DE OFERTAS DEL DIA */
.daily-special-banner {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
  width: 100%;
}

.special-banner-card {
  background: linear-gradient(135deg, rgba(35, 20, 13, 0.95), rgba(45, 25, 16, 0.95));
  border: 1px solid var(--gold-egg);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.2);
}

.special-badge-pill {
  display: inline-block;
  background: var(--gold-egg);
  color: #000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.special-banner-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.special-banner-desc {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 650px;
}

.special-banner-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.special-banner-price {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold-egg);
}

.btn-add-special {
  background: linear-gradient(135deg, var(--red-poncho), #b91c1c);
  color: #fff;
  border: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.btn-add-special:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

/* CATEGORÍAS */
.categories-nav {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}

.categories-nav::-webkit-scrollbar {
  display: none;
}

.category-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--farm-border);
  color: var(--text-muted);
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.category-pill:hover,
.category-pill.active {
  background: var(--gold-egg);
  color: #000;
  border-color: var(--gold-egg);
  transform: translateY(-2px);
}

/* BUSCADOR */
.search-container {
  margin-bottom: 2rem;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--farm-card);
  border: 1px solid var(--farm-border);
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold-egg);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* SECCIONES Y GRID */
.menu-category-section {
  margin-bottom: 3rem;
}

.category-title-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--farm-border);
  padding-bottom: 0.6rem;
}

.category-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cream-white);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* TARJETA DE PRODUCTO */
.item-card {
  background: var(--farm-card);
  border: 1px solid var(--farm-border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--farm-border-glow);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.item-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.item-badge {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  text-transform: uppercase;
}

.item-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.item-options-box {
  margin-bottom: 1rem;
}

.options-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-egg);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.options-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.opt-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--farm-border);
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.opt-pill.selected {
  background: var(--gold-egg);
  color: #000;
  border-color: var(--gold-egg);
  font-weight: 700;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
  margin-top: auto;
}

.item-price {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold-egg);
}

.btn-add {
  background: linear-gradient(135deg, var(--red-poncho), var(--red-poncho-dark));
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-add:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.counter-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--farm-border);
}

.counter-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.counter-qty {
  padding: 0 0.5rem;
  font-weight: 800;
  color: var(--gold-egg);
  font-size: 0.9rem;
}

/* BARRA FLOTANTE DEL CARRITO */
.floating-cart {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  width: calc(100% - 2rem);
  max-width: 500px;
  background: linear-gradient(135deg, #2a150c, #1a0d07);
  border: 2px solid var(--gold-egg);
  border-radius: 16px;
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-cart.visible {
  transform: translateX(-50%) translateY(0);
}

.cart-summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cart-icon-wrap {
  position: relative;
  font-size: 1.6rem;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--red-poncho);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-total-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cart-total-amount {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold-egg);
}

.btn-open-cart {
  background: linear-gradient(135deg, var(--gold-egg), #d97706);
  color: #000;
  border: none;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-cart:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* MODAL DEL CARRITO */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #180e07;
  border: 1px solid var(--farm-border);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* ITEMS EN EL MODAL */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.cart-item-unit-price {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-btn-del {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
}

/* SELECTOR DE MODALIDAD */
.delivery-selector-wrap {
  margin-bottom: 1.5rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-egg);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.delivery-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
}

.delivery-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--farm-border);
  color: #cbd5e1;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.delivery-btn.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold-egg);
  color: #fff;
}

.form-group {
  margin-bottom: 0.85rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-egg);
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

.grand-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.grand-total-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold-egg);
}

.btn-send-whatsapp {
  width: 100%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  padding: 0.95rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-send-whatsapp:hover {
  filter: brightness(1.1);
}

.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #231209;
  border: 1px solid var(--gold-egg);
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast-notice.visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .special-banner-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .special-banner-right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.75rem;
  }
}

/* Filtros arriba y sticky */
.categories-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(19, 10, 6, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
}

/* Ofertas compactas horizontales en móvil */
@media (max-width: 640px) {
  .daily-special-banner {
    display: flex !important;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.6rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
  }
  .special-banner-card {
    flex: 0 0 85% !important;
    scroll-snap-align: start;
    padding: 0.85rem 1rem !important;
    margin-bottom: 0 !important;
  }
  .special-banner-title {
    font-size: 0.95rem !important;
    margin-bottom: 0.2rem !important;
  }
  .special-banner-desc {
    font-size: 0.78rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem !important;
  }
  .special-banner-price {
    font-size: 1.2rem !important;
  }
  .btn-add-special {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.85rem !important;
  }
}
