/* Alimentos Superior - Frontend Styles */

:root {
  --primary: #d90429;
  --primary-container: #d90429;
  --on-primary: #ffffff;
  --on-primary-container: #ffeae8;
  --primary-fixed: #ffdad7;
  --primary-fixed-dim: #ffb3af;
  --on-primary-fixed: #410005;
  --secondary: #5b5d74;
  --on-secondary: #ffffff;
  --secondary-container: #ddddf9;
  --tertiary: #495567;
  --on-tertiary: #ffffff;
  --tertiary-container: #616d81;
  --error: #ba1a1a;
  --background: #f9f9f9;
  --surface: #f9f9f9;
  --surface-container: #eeeeee;
  --surface-container-low: #f3f3f4;
  --surface-container-lowest: #ffffff;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --surface-variant: #e2e2e2;
  --on-background: #1a1c1c;
  --on-surface: #1a1c1c;
  --on-surface-variant: #5d3f3d;
  --outline: #926e6c;
  --outline-variant: #e7bcba;
  --frosty-blue: #fef2f2;
  --frosty-border: #fecaca;
}

/* Landing papa prefrita Farm Frites 10x10 */
.potato-landing { overflow: hidden; color: #191b1b; }
.potato-hero { position: relative; isolation: isolate; background: #f5bd19; min-height: 680px; overflow: hidden; }
.potato-hero::before { content: ""; position: absolute; inset: 0; opacity: .14; z-index: -1; background-image: radial-gradient(#191b1b 1.25px, transparent 1.25px); background-size: 18px 18px; }
.potato-hero__content { width: min(1280px, calc(100% - 48px)); min-height: 680px; margin: auto; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 50px; padding: 72px 0; }
.potato-copy { position: relative; z-index: 2; }
.potato-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.potato-eyebrow span { width: 30px; height: 4px; background: #d90429; display: inline-block; }
.potato-copy h1 { max-width: 720px; margin: 18px 0; font-family: 'Anton', sans-serif; font-size: clamp(54px, 6vw, 92px); font-weight: 400; line-height: .94; letter-spacing: -.025em; text-transform: uppercase; }
.potato-lead { max-width: 650px; font-size: clamp(17px, 1.7vw, 22px); line-height: 1.5; }
.potato-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.potato-facts span { padding: 10px 13px; background: rgba(255,255,255,.7); border: 1px solid rgba(25,27,27,.35); font-size: 13px; text-transform: uppercase; }
.potato-facts strong { font-size: 17px; }
.potato-purchase { max-width: 650px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px; background: #fff; border: 3px solid #191b1b; box-shadow: 9px 9px 0 #d90429; }
.potato-purchase > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px; }
.potato-price-label { flex-basis: 100%; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.potato-price { font-family: 'Anton', sans-serif; font-size: clamp(32px, 4vw, 46px); line-height: 1; }
.potato-unit { color: #684844; font-size: 13px; font-weight: 700; }
.potato-buy { min-height: 54px; padding: 0 25px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #d90429; color: #fff; border: 2px solid #d90429; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; transition: transform .2s, background .2s, color .2s; }
.potato-buy:not(:disabled):hover { transform: translateY(-3px); background: #191b1b; border-color: #191b1b; }
.potato-buy:disabled { opacity: .55; cursor: not-allowed; }
.potato-status { margin: 18px 0; font-size: 13px; font-weight: 700; }
.potato-status::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #138a43; }
.potato-status.is-sold-out { color: #9f1239; }
.potato-status.is-sold-out::before { background: #d90429; }
.potato-status a { text-decoration: underline; }
.potato-trust { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.potato-trust span { display: flex; align-items: center; gap: 5px; }
.potato-trust .material-symbols-outlined { color: #d90429; font-size: 19px; }
.potato-visual { position: relative; min-height: 530px; display: grid; place-items: center; }
.potato-visual > img { position: relative; z-index: 2; width: min(600px, 100%); max-height: 540px; object-fit: contain; filter: drop-shadow(0 34px 24px rgba(51,30,0,.27)); transform: rotate(3deg); }
.potato-sunburst { position: absolute; z-index: 0; width: 520px; height: 520px; border-radius: 50%; background: repeating-conic-gradient(#fff 0 9deg, transparent 9deg 18deg); opacity: .32; animation: potatoSpin 50s linear infinite; }
.potato-sticker { position: absolute; right: 0; top: 5%; z-index: 4; width: 148px; height: 148px; display: grid; place-items: center; text-align: center; border-radius: 50%; background: #d90429; color: #fff; border: 5px solid #fff; outline: 3px solid #191b1b; font-family: 'Anton', sans-serif; font-size: 25px; line-height: 1.05; text-transform: uppercase; transform: rotate(9deg); }
.potato-brand-card { position: absolute; z-index: 4; left: 1%; bottom: 2%; display: flex; align-items: center; gap: 13px; max-width: 290px; padding: 13px 16px; background: #fff; border: 2px solid #191b1b; box-shadow: 7px 7px 0 #191b1b; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.potato-brand-card img { width: 90px; max-height: 44px; object-fit: contain; }
.potato-hero__glow { position: absolute; z-index: -2; border-radius: 50%; filter: blur(40px); }
.potato-hero__glow--one { width: 420px; height: 420px; right: -100px; top: -120px; background: #d90429; opacity: .32; }
.potato-hero__glow--two { width: 300px; height: 300px; left: -100px; bottom: -170px; background: #fff; opacity: .5; }
@keyframes potatoSpin { to { transform: rotate(360deg); } }
.potato-marquee { overflow: hidden; background: #191b1b; color: #fff; border-block: 3px solid #191b1b; }
.potato-marquee__track { display: flex; width: max-content; animation: potatoMarquee 28s linear infinite; font-family: 'Anton', sans-serif; font-size: 22px; letter-spacing: .08em; }
.potato-marquee__group { min-width: 100vw; display: flex; align-items: center; justify-content: space-around; gap: 26px; padding: 15px 26px; }
.potato-marquee b { color: #f5bd19; }
@keyframes potatoMarquee { to { transform: translateX(-50%); } }
.potato-benefits { width: min(1200px, calc(100% - 48px)); margin: auto; padding: 100px 0; }
.potato-section-heading { display: grid; grid-template-columns: .45fr 1fr; gap: 25px; align-items: start; margin-bottom: 46px; }
.potato-section-heading p { color: #d90429; font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.potato-section-heading h2, .potato-preparation h2, .potato-final h2 { font-family: 'Anton', sans-serif; font-size: clamp(40px, 5vw, 68px); line-height: 1; text-transform: uppercase; }
.potato-benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.potato-benefit-grid article { min-height: 285px; padding: 34px; border: 2px solid #191b1b; background: #fff; box-shadow: 7px 7px 0 #191b1b; }
.potato-benefit-grid .material-symbols-outlined { display: grid; place-items: center; width: 55px; height: 55px; margin-bottom: 45px; background: #f5bd19; border-radius: 50%; font-size: 29px; }
.potato-benefit-grid h3 { margin-bottom: 10px; font-family: 'Anton', sans-serif; font-size: 25px; text-transform: uppercase; }
.potato-benefit-grid p { color: #684844; line-height: 1.55; }
.potato-preparation { display: grid; grid-template-columns: 1.4fr .6fr; background: #d90429; color: #fff; }
.potato-preparation__panel { padding: clamp(50px, 8vw, 110px); background: #d90429; }
.potato-eyebrow--light span { background: #f5bd19; }
.potato-preparation h2 { margin: 18px 0 42px; }
.potato-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.potato-methods > div { display: flex; align-items: center; gap: 18px; padding: 20px; border: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.1); }
.potato-methods strong { font-family: 'Anton', sans-serif; color: #f5bd19; font-size: 42px; }
.potato-methods p { line-height: 1.5; }
.potato-preparation small { display: block; margin-top: 25px; opacity: .8; }
.potato-preparation__cta { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 17px; padding: 55px; background: #f5bd19; color: #191b1b; }
.potato-preparation__cta > .material-symbols-outlined { font-size: 70px; }
.potato-preparation__cta h3 { font-family: 'Anton', sans-serif; font-size: 35px; line-height: 1; text-transform: uppercase; }
.potato-preparation__cta p { line-height: 1.55; }
.potato-buy--dark { background: #191b1b; border-color: #191b1b; }
.potato-buy--dark:not(:disabled):hover { background: #fff; color: #191b1b; border-color: #191b1b; }
.potato-final { padding: 100px 24px; text-align: center; background: #fff; }
.potato-final > p { margin-bottom: 14px; color: #d90429; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.potato-final h2 { max-width: 850px; margin: 0 auto 35px; }
@media (max-width: 900px) {
  .potato-hero__content { grid-template-columns: 1fr; padding: 55px 0; }
  .potato-visual { min-height: 420px; order: -1; }
  .potato-visual > img { max-height: 410px; }
  .potato-section-heading { grid-template-columns: 1fr; }
  .potato-benefit-grid { grid-template-columns: 1fr; }
  .potato-preparation { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .potato-hero__content, .potato-benefits { width: min(100% - 28px, 1280px); }
  .potato-hero__content { gap: 15px; padding: 35px 0 50px; }
  .potato-copy h1 { font-size: 48px; }
  .potato-visual { min-height: 320px; }
  .potato-visual > img { max-height: 310px; }
  .potato-sunburst { width: 340px; height: 340px; }
  .potato-sticker { width: 108px; height: 108px; font-size: 19px; border-width: 4px; }
  .potato-brand-card { left: 0; bottom: 0; max-width: 235px; padding: 9px; }
  .potato-brand-card img { width: 72px; }
  .potato-purchase { align-items: stretch; flex-direction: column; }
  .potato-buy { width: 100%; }
  .potato-trust { gap: 10px; flex-direction: column; }
  .potato-benefits { padding: 70px 0; }
  .potato-benefit-grid article { min-height: 0; }
  .potato-benefit-grid .material-symbols-outlined { margin-bottom: 25px; }
  .potato-preparation__panel, .potato-preparation__cta { padding: 50px 24px; }
  .potato-methods { grid-template-columns: 1fr; }
  .potato-final { padding: 70px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .potato-sunburst, .potato-marquee__track { animation: none; }
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--background);
  color: var(--on-background);
  font-family: 'Chivo', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Portada: se alinea con el contenido de 1280 px del resto de la tienda. */
.home-hero {
  width: calc(100% - 2rem);
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  position: relative;
  justify-content: center;
  padding: 0.75rem;
}

@media (min-width: 768px) {
  .hero-actions {
    position: absolute;
    left: 2.5rem;
    bottom: 2.5rem;
    justify-content: flex-start;
    padding: 0;
  }
}

@media (min-width: 1024px) {
  .hero-actions {
    left: 3.5rem;
    bottom: 3.5rem;
  }
}

h1, h2, h3, h4, .font-headline {
  font-family: 'Anton', sans-serif;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.material-symbols-outlined.icon-filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.map-frame { border: 0; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-1000 { animation-delay: 1s; }

.admin-login-page {
  background-color: #1a1c1c;
  color: #ffffff;
}

.admin-login-page .frozen-shadow { box-shadow: 6px 6px 0 0 #ac001e; }

@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .boleta { box-shadow: none !important; border: none !important; }
}

.product-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(217, 4, 41, 0.15);
}

.frozen-border {
  border: 2px solid #1a1c1c;
}

.frozen-shadow {
  box-shadow: 4px 4px 0px 0px #1a1c1c;
}

.frozen-button-hover {
  transition: all 0.2s ease;
}

.frozen-button-hover:hover {
  background-color: #1a1c1c;
  color: #ffffff;
  box-shadow: none;
  transform: translate(2px, 2px);
}

.animate-fade-in-out {
  animation: fadeInOut 3s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-10px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.scroll-banner {
  display: flex;
  width: max-content;
  animation: scroll 20s linear infinite;
}

.scroll-banner__group {
  min-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

@keyframes brandsScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.brands-carousel {
  display: flex;
  animation: brandsScroll 15s linear infinite;
  width: max-content;
}

.brands-carousel__group {
  min-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4rem;
  padding-inline: 2rem;
}

.brands-carousel:hover {
  animation-play-state: paused;
}

/* Logo slide animation */
@keyframes logoSlide {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(5px) rotate(-2deg); }
  50% { transform: translateX(0) rotate(0deg); }
  75% { transform: translateX(-5px) rotate(2deg); }
}

.logo-slide {
  animation: logoSlide 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.logo-slide:hover {
  animation-play-state: paused;
  transform: scale(1.1);
}

/* Announcement banner scroll */
@keyframes announcementScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.announcement-scroll {
  display: flex;
  animation: announcementScroll 12s linear infinite;
  width: max-content;
}

.announcement-scroll__group {
  min-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.announcement-scroll:hover {
  animation-play-state: paused;
}

/* Category circles animation */
.category-circle {
  animation: categoryFloat 4s ease-in-out infinite;
}

.category-circle:nth-child(2) { animation-delay: 0.3s; }
.category-circle:nth-child(3) { animation-delay: 0.6s; }
.category-circle:nth-child(4) { animation-delay: 0.9s; }
.category-circle:nth-child(5) { animation-delay: 1.2s; }
.category-circle:nth-child(6) { animation-delay: 1.5s; }

.category-circle:hover {
  animation-play-state: paused;
}

@keyframes categoryFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Top info bar scroll for mobile */
@media (max-width: 768px) {
  .top-info-scroll {
    animation: announcementScroll 20s linear infinite;
    width: max-content;
  }
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--outline);
  border-radius: 10px;
}

/* Admin specific */
.admin-frozen-shadow {
  box-shadow: 4px 4px 0px 0px #1a1c1c;
}

.admin-frozen-button-hover:hover {
  background-color: #1a1c1c;
  color: #ffffff;
  box-shadow: none;
  transform: translate(2px, 2px);
}

/* Toast notifications */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
}

.toast.success {
  background-color: var(--on-background);
  color: white;
}

.toast.error {
  background-color: var(--error);
  color: white;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Float animation */
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.gentle-float {
  animation: gentleFloat 4s ease-in-out infinite;
}

/* Pulse ring */
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid currentColor;
  animation: pulseRing 2s ease-out infinite;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-container) 25%, var(--surface-container-high) 50%, var(--surface-container) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
