/* Micao Bakery — estilos de marca (sin build; Tailwind llega por CDN) */
:root {
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Work Sans', ui-sans-serif, system-ui, sans-serif;
  --color-cafe: #472311;
  --color-naranja: #e3601f;
  --color-crema: #ffeac5;
  --color-crema-suave: #faf0da;
  --color-cafe-suave: #7a3d1a;
  --color-blanco: #fffaf0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-crema);
  color: var(--color-cafe);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-size: 1rem;
  line-height: 1.5;
  min-height: 100dvh;
}

:focus-visible {
  outline: 3px solid var(--color-naranja);
  outline-offset: 2px;
}

input, select, textarea, button {
  font: inherit;
}

.font-display {
  font-family: var(--font-display);
}

.text-hero {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
}

.text-h2 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
  min-height: 3rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  transition: transform 0.15s ease, filter 0.15s ease;
  min-height: 3rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background-color: var(--color-naranja);
  color: var(--color-blanco);
}

.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  transition: transform 0.15s ease, background-color 0.15s ease;
  min-height: 3rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background-color: var(--color-cafe);
  color: var(--color-blanco);
}

.btn-secondary:hover { background-color: var(--color-cafe-suave); }
.btn-secondary:active { transform: scale(0.98); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  transition: transform 0.15s ease, background-color 0.15s ease;
  min-height: 3rem;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--color-cafe);
  border: 1px solid color-mix(in srgb, var(--color-cafe) 20%, transparent);
}

.btn-ghost:hover { background-color: var(--color-crema-suave); }
.btn-ghost:active { transform: scale(0.98); }

.btn-block { width: 100%; }

.card {
  position: relative;
  background-color: var(--color-crema-suave);
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--color-cafe) 15%, transparent);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.card-interactive:hover,
.card-interactive:active {
  transform: scale(1.02);
}

.tag-hanging {
  position: absolute;
  top: -0.35rem;
  right: 0.85rem;
  z-index: 2;
  background: var(--color-naranja);
  color: var(--color-blanco);
  font-family: var(--font-sans);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  padding: 0.45rem 0.7rem 0.55rem;
  border-radius: 0.35rem 0.35rem 0.55rem 0.55rem;
  transform: rotate(4deg);
  box-shadow: 0 2px 0 rgba(94, 42, 11, 0.18);
  line-height: 1;
}

.tag-hanging::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  width: 2px;
  height: 10px;
  background: #8b5a2b;
  transform: translateX(-50%);
}

.tag-hanging::after {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #8b5a2b;
  border-radius: 50%;
  background: var(--color-crema-suave);
  transform: translateX(-50%);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background-color: var(--color-naranja);
  color: var(--color-blanco);
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--color-cafe) 20%, transparent);
  background-color: var(--color-crema-suave);
  color: var(--color-cafe);
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.chip:active { transform: scale(0.96); }

.chip-active {
  background-color: var(--color-cafe);
  color: var(--color-blanco);
  border-color: var(--color-cafe);
}

.field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--color-cafe) 20%, transparent);
  background-color: var(--color-blanco);
  color: var(--color-cafe);
  padding: 0.875rem 1rem;
  min-height: 3rem;
}

.field::placeholder {
  color: color-mix(in srgb, var(--color-cafe) 40%, transparent);
}

.field:focus {
  border-color: var(--color-naranja);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-naranja) 30%, transparent);
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-cafe);
  margin-bottom: 0.375rem;
}

.site-header,
.site-footer {
  background-color: var(--color-cafe);
  color: var(--color-blanco);
}

.premios-banner {
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--color-crema);
  border: 1px solid color-mix(in srgb, var(--color-cafe) 12%, transparent);
}

.premios-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.points-hero {
  background-color: var(--color-cafe);
  color: var(--color-blanco);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
}

.progress-track {
  height: 0.75rem;
  border-radius: 9999px;
  background-color: var(--color-crema-suave);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-cafe) 10%, transparent);
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background-color: var(--color-naranja);
  width: 0%;
  transition: width 1s ease-out;
}

.admin-nav-link {
  display: block;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--color-blanco) 85%, transparent);
  text-decoration: none;
}

.admin-nav-link:hover {
  background-color: var(--color-cafe-suave);
  color: var(--color-blanco);
}

.admin-nav-link-active {
  background-color: var(--color-cafe-suave);
  color: var(--color-blanco);
}

.flash-success {
  border-radius: 0.75rem;
  background-color: color-mix(in srgb, var(--color-naranja) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-naranja) 30%, transparent);
  color: var(--color-cafe);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.flash-error {
  border-radius: 0.75rem;
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #7f1d1d;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 1rem;
  background: linear-gradient(to top, var(--color-crema), var(--color-crema), transparent);
}

.price-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.category-bar {
  top: 3.5rem;
  background: color-mix(in srgb, var(--color-crema) 94%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--color-cafe) 12%, transparent);
  overflow: hidden;
}

.category-bar-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 0.125rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.celular-suggestion:active,
.celular-suggestion.bg-crema {
  background-color: var(--color-crema);
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.site-logo-horizontal {
  height: 1.75rem;
  width: auto;
  max-width: min(52vw, 11.5rem);
  object-fit: contain;
  display: block;
}

.site-logo-vertical {
  width: clamp(8.5rem, 42vw, 12.5rem);
  height: auto;
  object-fit: contain;
  display: block;
  padding-top: 1.25rem;
  filter: drop-shadow(0 8px 18px rgba(94, 42, 11, 0.12));
}

.mascota-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 1rem;
  overflow: visible;
  min-height: 8rem;
  padding: 0.75rem;
  pointer-events: none;
}

.mascota-card img {
  width: auto;
  height: clamp(5.5rem, 28vw, 7.5rem);
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.category-section {
  display: none;
  opacity: 0;
  transform: translateY(12px);
}

.category-section.is-visible {
  display: block;
  animation: category-in 0.38s ease forwards;
}

.category-section.is-leaving {
  display: block;
  animation: category-out 0.22s ease forwards;
  pointer-events: none;
}

.category-section.is-visible .product-card {
  animation: card-in 0.4s ease both;
}

.category-section.is-visible .product-card:nth-child(1) { animation-delay: 0.02s; }
.category-section.is-visible .product-card:nth-child(2) { animation-delay: 0.07s; }
.category-section.is-visible .product-card:nth-child(3) { animation-delay: 0.12s; }
.category-section.is-visible .product-card:nth-child(4) { animation-delay: 0.17s; }
.category-section.is-visible .product-card:nth-child(5) { animation-delay: 0.22s; }
.category-section.is-visible .product-card:nth-child(6) { animation-delay: 0.27s; }

@keyframes category-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes category-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .category-section.is-visible,
  .category-section.is-leaving,
  .category-section.is-visible .product-card {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.product-slider-viewport {
  touch-action: pan-y;
}

.product-slider-track {
  will-change: transform;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: none;
  background: color-mix(in srgb, var(--color-cafe) 72%, transparent);
  color: var(--color-blanco);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.slider-prev { left: 0.75rem; }
.slider-next { right: 0.75rem; }
.slider-nav:hover { background: var(--color-cafe); }

.slider-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  border: none;
  padding: 0;
  background: color-mix(in srgb, var(--color-cafe) 25%, transparent);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.slider-dot.is-active {
  width: 1.35rem;
  background: var(--color-naranja);
}

/* Carrito */
.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cart-modal.hidden {
  display: none;
}

.cart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(71, 35, 17, 0.45);
}

.cart-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  max-height: 92dvh;
  overflow: auto;
  background: var(--color-crema);
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(71, 35, 17, 0.18);
}

@media (min-width: 640px) {
  .cart-modal {
    align-items: center;
    padding: 1rem;
  }

  .cart-modal-panel {
    border-radius: 1.25rem;
    max-height: 85dvh;
  }
}

.cart-close-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: none;
  background: color-mix(in srgb, var(--color-cafe) 10%, transparent);
  color: var(--color-cafe);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cart-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--color-crema-suave);
  border: 1px solid color-mix(in srgb, var(--color-cafe) 12%, transparent);
  border-radius: 0.9rem;
  padding: 0.75rem;
}

.cart-item img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.65rem;
  object-fit: cover;
  background: var(--color-crema);
  flex-shrink: 0;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.cart-item-qty input {
  width: 3.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.4rem;
  text-align: center;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--color-cafe) 20%, transparent);
  background: var(--color-blanco);
  color: var(--color-cafe);
}

.cart-item-qty button,
.cart-item-remove {
  border: none;
  background: transparent;
  color: var(--color-cafe);
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  border-radius: 0.4rem;
}

.cart-item-remove {
  color: #b91c1c;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

.cart-header-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: var(--color-naranja);
  color: var(--color-blanco);
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-fab {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  z-index: 45;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  border: none;
  background: var(--color-cafe);
  color: var(--color-blanco);
  box-shadow: 0 6px 18px rgba(71, 35, 17, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.cart-fab.hidden {
  display: none;
}

.cart-fab-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 9999px;
  background: var(--color-naranja);
  color: var(--color-blanco);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-add-box {
  background: var(--color-crema-suave);
  border: 1px solid color-mix(in srgb, var(--color-cafe) 12%, transparent);
  border-radius: 0.9rem;
  padding: 0.85rem;
}
