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

html {
  scroll-behavior: smooth;
}

body {
  background: #fff;
  color: #1a1a1a;
}

/* LOGO */
.logo {
  width: 60px;
  border-radius: 50%;
}

/* ===============================
   LOADER
================================ */
#loader {
  position: fixed;
  inset: 0;
  background: #0b2d4d;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity .6s ease, visibility .6s ease;
}

#loader img {
  width: 120px;
  border-radius: 50%;
  animation: spinLogo 1.5s ease-in-out forwards;
}

@keyframes spinLogo {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
  80% {
    transform: rotate(360deg) scale(1.05);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

#loader.hide {
  opacity: 0;
  visibility: hidden;
}

/* ===============================
   HEADER
================================ */
.header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #0b2d4d;
  color: #fff;
}

.header-text h1 {
  font-size: 1.6rem;
  letter-spacing: 1px;
}

.header-text p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.header-account {
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
}

.auth-account-btn,
.auth-history-btn {
  border: 1px solid rgba(255,255,255,.5);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-account-btn:hover,
.auth-history-btn:hover {
  background: rgba(255,255,255,.12);
}

/* ===============================
   NAV
================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1f4e79;
  display: flex;
  justify-content: space-around;
  padding: 12px 5px;
}

.nav a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  color: #fff;
}

.nav a:hover {
  text-decoration: underline;
}

/* ===============================
   MENU GRID
================================ */
.menu {
  display: grid;
  gap: 16px;
  padding: 20px;
  max-width: 1600px;
  margin: auto;
}

/* ===============================
   SECTION TITLE
================================ */
.section-title {
  grid-column: 1 / -1;
  margin: 30px 0 10px;
  border-left: 6px solid #1f4e79;
  padding-left: 12px;
  color: #0b2d4d;
}

/* ===============================
   PLATO CARD
================================ */
.plato {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  transition: transform .3s;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plato img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform .4s ease;
}

/* Desktop hover */
.plato:hover img {
  transform: scale(1.08);
}

/* Mobile tap */
.plato:active img {
  transform: scale(1.1);
}

.plato h3 {
  margin: 10px 0 5px;
  font-size: 1rem;
  color: #0b2d4d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.5em;
}

.plato p {
  font-size: 0.85rem;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3.6em;
}

.plato span {
  display: block;
  margin-top: 6px;
  font-weight: bold;
  color: #1f4e79;
}

.plato-action {
  margin-top: auto;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.add-cart-btn {
  margin-top: 0;
  width: auto;
  min-width: 128px;
  border: none;
  border-radius: 999px;
  background: #1f4e79;
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 12px;
  cursor: pointer;
}

.add-cart-btn:hover {
  background: #163c60;
}


.add-cart-btn:disabled {
  background: #9aa4af;
  cursor: not-allowed;
}

.sold-out-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.plato-unavailable {
  width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #f2c9a8;
  background: linear-gradient(135deg, #fff5ea, #ffe7d4);
  color: #8a3f08;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
}

.cart-price-change-notice {
  margin: 8px 0 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f5d19b;
  background: #fff8eb;
  color: #8a4b0f;
  font-size: 0.86rem;
  font-weight: 600;
}

/* ===============================
   FOOTER
================================ */
footer {
  background: #0b2d4d;
  color: #fff;
  padding: 20px;
  text-align: center;
}

.socials img {
  width: 26px;
  filter: invert(1);
  margin: 15px 8px;
}

/* ===============================
   ANIMACIONES
================================ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: .6s;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   RESPONSIVE GRID
================================ */

/* Monitores grandes / ultrawide */
@media (min-width: 1400px) {
  .menu {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Desktop normal */
@media (max-width: 1399px) {
  .menu {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablets */
@media (max-width: 1024px) {
  .menu {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .menu {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-modal-content {
    width: calc(100% - 20px);
    max-height: 88vh;
    padding: 14px;
  }
}

/* Mobile pequeño */
@media (max-width: 480px) {
  .menu {
    grid-template-columns: 1fr 0.95fr;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item img {
    width: 100%;
    height: 140px;
  }
}

/* ===============================
   WHATSAPP FLOAT
================================ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 55px;
  height: 55px;
  background: #178d42;
  border-radius: 60%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  transition: transform .3s;
}

.whatsapp-float img {
  width: 28px;
  height: 28px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* ===============================
   CARRITO + CHECKOUT
================================ */
.cart-float {
  position: fixed;
  bottom: 20px;
  right: 88px;
  width: 55px;
  height: 55px;
  border: none;
  border-radius: 50%;
  background: #0b2d4d;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 51;
}

.cart-icon {
  font-size: 1.3rem;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c1121f;
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 10px;
}

.cart-modal.open {
  display: flex;
}

.cart-modal-content {
  background: #fff;
  border-radius: 14px;
  width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
}

.cart-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: none;
  font-size: 1.8rem;
  cursor: pointer;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.cart-preview-info {
  margin: 4px 0 2px;
  font-size: 0.85rem;
  color: #1f4e79;
  background: #edf4fb;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  padding: 8px 10px;
}

.cart-empty {
  margin: 12px 0;
  color: #666;
}

.cart-item {
  display: flex;
  gap: 12px;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  padding: 8px;
}

.cart-item img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-data {
  width: 100%;
}

.cart-item-data h4 {
  color: #0b2d4d;
  margin-bottom: 4px;
}

.cart-item-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-item-actions button {
  border: 1px solid #c8c8c8;
  background: #f7f7f7;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.cart-item-actions .danger {
  border-color: #d64545;
  color: #d64545;
}


.store-status-banner {
  margin-top: 10px;
  font-size: 0.9rem;
  background: #fff3f3;
  border: 1px solid #f1c7c7;
  color: #9f1d1d;
  border-radius: 8px;
  padding: 9px 10px;
}

.delivery-zone-department {
  margin: 0;
  font-size: 0.84rem;
  color: #4b5563;
}

.delivery-zone-feedback {
  margin-top: 2px;
  font-size: 0.84rem;
  color: #1f4e79;
}


.cart-total-final {
  border-top: 2px solid #dfe7ef;
}
.cart-total-row {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
  border-top: 1px solid #ececec;
  padding-top: 10px;
}


.go-checkout-btn {
  margin-top: 16px;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: #1f4e79;
  color: #fff;
  font-weight: bold;
  padding: 10px;
  cursor: pointer;
}

.go-checkout-btn:hover {
  background: #163c60;
}

.checkout-section {
  margin-top: 8px;
}
.checkout-form {
  margin-top: 18px;
  display: grid;
  gap: 7px;
}


.checkout-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.checkout-header-row h3 {
  margin: 0;
}

.back-to-cart-btn {
  border: 1px solid #b7c7d7;
  background: #f2f7fc;
  color: #0b2d4d;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.82rem;
  cursor: pointer;
}

.back-to-cart-btn:hover {
  background: #e7f0f8;
}
.checkout-form h3 {
  margin-bottom: 4px;
}


.checkout-conditional-group {
  display: grid;
  gap: 7px;
}

.checkout-conditional-group.hidden {
  display: none;
}

.pickup-location {
  font-size: 0.9rem;
  background: #edf4fb;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  color: #0b2d4d;
  padding: 9px 10px;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 94px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(11, 45, 77, 0.96);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.cart-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  border: 1px solid #cfcfcf;
  border-radius: 7px;
  padding: 10px;
}

.checkout-feedback {
  margin-top: 6px;
  font-size: 0.92rem;
}

.checkout-feedback.info {
  color: #1f4e79;
}

.checkout-feedback.error {
  color: #c1121f;
}

.checkout-feedback.success {
  color: #178d42;
  font-weight: bold;
}

.checkout-confirm,
.checkout-whatsapp,
.receipt-download-btn {
  margin-top: 5px;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.checkout-confirm {
  background: #0b2d4d;
  color: #fff;
}

.checkout-confirm:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.checkout-whatsapp {
  background: #1fb653;
  color: #fff;
}

.order-receipt {
  margin-top: 10px;
  border: 1px dashed #88a9c7;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
}

.order-receipt h4 {
  color: #0b2d4d;
  margin-bottom: 6px;
}

.order-receipt-content p {
  font-size: 0.86rem;
  margin: 2px 0;
  color: #2b2b2b;
}

.receipt-download-btn {
  border: 1px solid #1f4e79;
  color: #1f4e79;
  background: #fff;
}

.receipt-download-btn:hover {
  background: #eef5fc;
}

.receipt-modal-content {
  width: 640px;
}

.receipt-subtitle {
  margin: 6px 0 10px;
  color: #3d3d3d;
  font-size: 0.92rem;
}

.receipt-actions {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.tracking-link {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.receipt-track-btn {
  border: 1px solid #1f4e79;
  background: #fff;
  color: #1f4e79;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.tracking-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 19, 34, 0.65);
  z-index: 1300;
  padding: 16px;
}

.tracking-modal.open {
  display: flex;
}

.tracking-modal-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  position: relative;
}

.tracking-muted {
  color: #667085;
  margin-bottom: 10px;
}

#trackingCode {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}

.tracking-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.tracking-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.tracking-primary {
  background: #1f4e79;
  color: #fff;
}

.tracking-ghost {
  border: 1px solid #1f4e79;
  background: #fff;
  color: #1f4e79;
}

.tracking-danger {
  background: #b42318;
  color: #fff;
}

.tracking-full {
  width: 100%;
  margin-top: 12px;
}

.tracking-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tracking-result {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 12px;
  min-height: 84px;
}

.tracking-error {
  color: #b42318;
  font-weight: 600;
}

.tracking-order-meta {
  margin-bottom: 10px;
}

.tracking-order-meta p {
  margin: 3px 0;
  color: #1f2937;
}

.tracking-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tracking-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #667085;
  font-size: 0.92rem;
}

.tracking-step-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: transparent;
}

.tracking-step.completed,
.tracking-step.active {
  color: #0b2d4d;
  font-weight: 700;
}

.tracking-step.completed .tracking-step-dot,
.tracking-step.active .tracking-step-dot {
  border-color: #1f4e79;
  background: #1f4e79;
}

.tracking-step.cancelled {
  color: #b42318;
  font-weight: 700;
}

.tracking-step.cancelled .tracking-step-dot {
  border-color: #b42318;
  background: #b42318;
}


.tracking-float {
  position: fixed;
  right: 20px;
  bottom: 92px;
  z-index: 1200;
  border: none;
  border-radius: 999px;
  background: #0b2d4d;
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 45, 77, 0.35);
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
}

.tracking-float:hover {
  background: #123d66;
}

.tracking-float-icon {
  font-size: 1rem;
}

.cart-availability-note {
  margin: 8px 0 0;
  color: #b42318;
  font-size: 0.86rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .tracking-float {
    right: 14px;
    bottom: 88px;
    padding: 10px;
  }

  .tracking-float span:last-child {
    display: none;
  }
}


.auth-modal-card {
  max-width: 440px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
}

.history-item {
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

/* ======== Sprint visual carta pública ======== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 420;
  gap: 10px;
  padding: 10px 14px;
  background: #204a79;
  overflow: visible;
}

.menu-trigger {
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.header-search-wrap { flex: 1; min-width: 180px; }
.header-search {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: #fff;
  padding: 10px 14px;
}

.header-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 380;
}


.account-dropdown-wrap {
  position: relative;
  z-index: 320;
}

.auth-account-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.1);
  color: #fff;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.auth-account-btn:hover {
  background: rgba(255,255,255,.12);
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid #d7e2ee;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
  padding: 6px;
  display: none;
  z-index: 360;
}

.account-dropdown.open {
  display: grid;
  gap: 4px;
}

.account-dropdown-item {
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  padding: 10px 12px;
  color: #1e293b;
  font-weight: 600;
  cursor: pointer;
}

.account-dropdown-item:hover {
  background: #eff6ff;
  color: #1e40af;
}

.account-dropdown-item.danger {
  color: #b42318;
}

.account-dropdown-item.danger:hover {
  background: #ffe4e6;
  color: #9f1239;
}

.top-pill-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.1);
  color: #fff;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.hero-banner {
  background: linear-gradient(rgba(9,32,62,.78), rgba(9,32,62,.78)), url('../images/Logos/logo.jpg') center/cover;
  color: #fff;
  padding: 18px 16px;
}
.hero-overline { color: #9dc3ff; font-weight: 700; margin-bottom: 5px; }
.hero-banner h2 { margin-bottom: 6px; font-size: 2.2rem; }

.nav {
  top: 62px;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border-bottom: 1px solid #dbe5f0;
}

.nav a {
  color: #163c60;
  background: #edf2f7;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 8px 14px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1400px;
}

.section-title {
  margin: 12px 0;
}

.category-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.carousel-arrow {
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #204a79;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 14px;
  transition: transform .42s ease;
}

.carousel-track .plato {
  min-width: 210px;
  max-width: 210px;
  text-align: left;
  height: 100%;
}

.carousel-track .plato img {
  height: 170px;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.carousel-track .add-cart-btn {
  width: 100%;
}

@media (max-width: 900px) {
  .hero-banner h2 { font-size: 1.5rem; }
  .header-search-wrap { order: 4; width: 100%; }
  .nav { top: 98px; }
}

@media (max-width: 640px) {
  .carousel-arrow { display: none; }
  .carousel-viewport { overflow-x: auto; }
  .carousel-track { padding-bottom: 6px; }
}

/* ======== Mejoras auth modal + nav activo ======== */
.nav a.active-category {
  background: #204a79;
  color: #fff;
  border-color: #204a79;
  box-shadow: 0 6px 14px rgba(32,74,121,.25);
}

.auth-modal-shell {
  max-width: 1080px;
  width: min(92vw, 1080px);
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

.auth-side-visual {
  background: linear-gradient(rgba(16,53,93,.82), rgba(16,53,93,.82)), url('../images/Logos/logo.jpg') center/cover;
  position: relative;
  min-height: 620px;
}

.auth-side-overlay {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  color: #dbe9ff;
}

.auth-side-overline {
  letter-spacing: .08em;
  font-size: .9rem;
  opacity: .9;
}

.auth-side-overlay h3 {
  font-size: 2.8rem;
  margin-top: 8px;
  margin-bottom: 8px;
  color: #fff;
}

.auth-side-overlay p { font-size: 1.05rem; line-height: 1.45; }

.auth-side-form {
  background: #fff;
  padding: 20px;
  position: relative;
  max-height: 86vh;
  overflow-y: auto;
}

.auth-close-icon {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #e7eff9;
  color: #193f66;
  font-size: 1.3rem;
}

.auth-tabs {
  margin-top: 10px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-tab-btn {
  border-radius: 10px;
  border: 1px solid #245481;
  background: #fff;
  color: #245481;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
}

.auth-tab-btn.active {
  background: #245481;
  color: #fff;
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.auth-form label {
  font-weight: 700;
  color: #334155;
}

.auth-form input {
  border-radius: 10px;
  border: 1px solid #c7d2e0;
  padding: 10px;
}

.auth-forgot-link {
  color: #245481;
  text-decoration: underline;
  font-weight: 500;
}

.auth-only-register.hidden { display: none; }
.auth-only-login.hidden { display: none; }

.auth-only-login,
.auth-only-register {
  display: grid;
  gap: 10px;
}

@media (max-width: 980px) {
  .auth-modal-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-side-visual {
    min-height: 220px;
  }

  .auth-side-overlay h3 {
    font-size: 2rem;
  }
}

/* ajustes header actions */
.header-actions .cart-badge {
  position: static;
  margin-left: 6px;
  background: #facc15;
  color: #0f172a;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: .72rem;
}

.cart-top-btn { display: inline-flex; align-items: center; }

.profile-modal-card {
  max-width: 560px;
}


.modal-close-icon {
  right: 10px;
  top: 10px;
  z-index: 2;
}

.customer-profile-card {
  max-width: 760px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #d8e2ef;
  background: #eef3f9;
}

.profile-form-adminlike {
  margin-top: 10px;
}

.profile-form-adminlike input[readonly] {
  background: #f1f5f9;
  color: #334155;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #dcfce7;
  color: #166534;
}

.profile-pill.pending {
  background: #fef3c7;
  color: #92400e;
}

.profile-help {
  margin: -4px 0 4px;
  color: #64748b;
  font-size: 0.84rem;
}

.orders-modal-card {
  max-width: 980px;
}

.orders-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.history-item-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
}

.history-item-btn.active {
  border-color: #1d4f91;
  background: #eef4fc;
}

.order-detail-panel {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
  min-height: 220px;
}

.order-detail-panel .tracking-order-meta p {
  margin: 4px 0;
}


.checkout-identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 4px;
}

.checkout-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1e293b;
}

.checkout-identity-help {
  margin: 0 0 8px;
}

@media (max-width: 760px) {
  .checkout-identity-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

@media (max-width: 760px) {
  .header-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .account-dropdown {
    left: 0;
    right: auto;
    min-width: min(86vw, 260px);
  }
}

/* layout estable para evitar hueco bajo footer */
html, body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.menu {
  flex: 1;
}

.site-footer {
  margin-top: auto;
  background: #0f2d52;
  color: #fff;
  padding: 22px 20px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.site-footer h4 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.site-footer p,
.site-footer .tracking-link {
  color: #e2ecff;
  line-height: 1.5;
}

.auth-google-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.google-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(#ea4335 0 90deg, #fbbc05 90deg 180deg, #34a853 180deg 270deg, #4285f4 270deg 360deg);
  display: inline-block;
}


.auth-field-error {
  display: block;
  min-height: 1em;
  margin-top: 2px;
  color: #dc2626;
  font-size: 0.82rem;
}

#auth-form [aria-invalid="true"] {
  border-color: #ef4444;
}


.auth-password-rules {
  margin: -2px 0 4px;
  padding-left: 18px;
  display: grid;
  gap: 2px;
  color: #64748b;
  font-size: 0.84rem;
}

.auth-password-rules li.ok {
  color: #15803d;
  font-weight: 600;
}

/* ======== Sprint 21: mobile overflow hotfixes (cambios mínimos) ======== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-header,
.hero-banner,
.nav,
.menu,
.category-row,
.carousel-viewport,
.tracking-modal-card,
.cart-modal-content,
.auth-modal-shell,
.auth-side-form,
.profile-modal-card,
.orders-modal-card {
  max-width: 100%;
}

.header-text,
.header-search-wrap,
.header-actions,
.auth-side-form,
.order-detail-panel {
  min-width: 0;
}

.menu {
  width: min(100%, 1400px);
  margin-left: auto;
  margin-right: auto;
}

.cart-modal-content {
  width: min(720px, 100%);
}

@media (max-width: 760px) {
  .app-header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
  }

  .header-search-wrap {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    order: initial;
  }

  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .top-pill-btn,
  .auth-account-btn,
  .cart-top-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .account-dropdown-wrap {
    flex-shrink: 0;
  }

  .nav {
    top: 148px;
    z-index: 120;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .nav a {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .auth-modal-shell,
  .tracking-modal-card,
  .cart-modal-content,
  .profile-modal-card,
  .orders-modal-card {
    width: min(96vw, 560px);
  }
}


/* ======== Sprint 22: sticky nav hardening (mobile + desktop) ======== */
.nav {
  position: sticky;
  top: 62px;
  z-index: 200;
}

@media (max-width: 900px) {
  .nav {
    top: 112px;
  }
}

@media (max-width: 760px) {
  .nav {
    top: 136px;
  }
}
