/* Paleta estilo "Los Simpsons" */
:root{
  --simpson-yellow: #ffeb3b; /* skin-ish bright yellow */
  --simpson-blue: #0277bd;   /* Homer shirt / blue */
  --simpson-red: #d32f2f;    /* accent */
  --simpson-brown: #795548;  /* details */
  --simpson-green: #2e7d32;  /* success */
}

/* Simple utilities to complement Tailwind (used together with CDN) */
.bg-simpson-yellow{ background-color: var(--simpson-yellow) !important; }
.text-simpson-yellow{ color: var(--simpson-yellow) !important; }
.bg-simpson-blue{ background-color: var(--simpson-blue) !important; }
.text-simpson-blue{ color: var(--simpson-blue) !important; }
.border-simpson-blue{ border-color: var(--simpson-blue) !important; }
.bg-simpson-red{ background-color: var(--simpson-red) !important; }

/* Card with subtle Simpsons vibe */
.card-simpson{
  background: linear-gradient(180deg, rgba(255,235,59,0.08), rgba(2,119,189,0.02));
  border: 1px solid rgba(2,119,189,0.08);
  border-radius: 1rem;
  padding: 1rem;
}

/* Button accent */
.btn-simpson{
  background: linear-gradient(90deg,var(--simpson-blue), #1565c0);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: .75rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(2,119,189,0.18);
}
.btn-simpson-yellow{
  background: linear-gradient(90deg,var(--simpson-yellow), #fdd835);
  color: #111;
  padding: .6rem 1rem;
  border-radius: .75rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255,235,59,0.12);
}

/* Small helpers */
.text-simpson-muted{ color: rgba(33,33,33,0.6); }

/* Responsive hero image treatment */
.hero-img-fade{ object-fit: cover; width:100%; height:100%; filter: saturate(1.05) contrast(1.02); }

/* Home menu product lightbox */
.home-menu-image-trigger{
  cursor: zoom-in;
  position: relative;
}

.home-menu-image-trigger img{
  transition: transform 180ms ease;
}

.home-menu-image-trigger:hover img{
  transform: scale(1.04);
}

.home-menu-image-trigger:focus-visible{
  outline: 2px solid var(--simpson-blue);
  outline-offset: 2px;
}

body.home-menu-lightbox-open{
  overflow: hidden;
}

.home-menu-lightbox{
  align-items: center;
  background: rgba(17,24,39,0.74);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 1rem;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 90;
}

.home-menu-lightbox.is-open{
  opacity: 1;
  pointer-events: auto;
}

.home-menu-lightbox__backdrop{
  background: transparent;
  border: 0;
  cursor: zoom-out;
  inset: 0;
  margin: 0;
  padding: 0;
  position: absolute;
}

.home-menu-lightbox__dialog{
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 24px 55px rgba(17,24,39,0.3);
  max-height: calc(100dvh - 2rem);
  max-width: min(900px, 100%);
  overflow: hidden;
  position: relative;
  transform: translateY(12px) scale(0.985);
  transition: transform 180ms ease;
  width: 100%;
  z-index: 1;
}

.home-menu-lightbox.is-open .home-menu-lightbox__dialog{
  transform: translateY(0) scale(1);
}

.home-menu-lightbox__header{
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .75rem .9rem;
}

.home-menu-lightbox__title{
  color: #111827;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.home-menu-lightbox__close{
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.45rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  width: 2rem;
}

.home-menu-lightbox__close:hover{
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #111827;
}

.home-menu-lightbox__close:focus-visible{
  outline: 2px solid var(--simpson-blue);
  outline-offset: 2px;
}

.home-menu-lightbox__media{
  align-items: center;
  background: #f9fafb;
  display: flex;
  justify-content: center;
  max-height: calc(100dvh - 6.5rem);
  min-height: 14rem;
  overflow: auto;
  padding: .9rem;
}

.home-menu-lightbox__image{
  display: block;
  height: auto;
  max-height: calc(100dvh - 8.5rem);
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

/* Improve toast from home.js */
.simpson-toast{
  border-radius: .5rem;
  padding: .6rem .9rem;
  font-weight: 600;
}

body.cart-note-modal-open,
body.cart-extra-modal-open{
  overflow: hidden;
}

.cart-note-btn,
.cart-extra-btn,
.cart-customize-btn{
  align-items: center;
  background: linear-gradient(180deg, rgba(2,119,189,0.14), rgba(2,119,189,0.07));
  border: 1px solid rgba(2,119,189,0.18);
  border-radius: 999px;
  color: #0f4c81;
  cursor: pointer;
  display: inline-flex;
  font-size: .84rem;
  font-weight: 700;
  gap: .35rem;
  line-height: 1;
  padding: .55rem .95rem;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.cart-note-btn:hover,
.cart-extra-btn:hover,
.cart-customize-btn:hover{
  background: linear-gradient(180deg, rgba(2,119,189,0.18), rgba(2,119,189,0.1));
  border-color: rgba(2,119,189,0.28);
  box-shadow: 0 12px 24px rgba(2,119,189,0.12);
  transform: translateY(-1px);
}

.cart-note-btn:focus-visible,
.cart-extra-btn:focus-visible,
.cart-customize-btn:focus-visible{
  outline: 2px solid var(--simpson-blue);
  outline-offset: 2px;
}

.cart-note-btn--compact,
.cart-extra-btn--compact,
.cart-customize-btn--compact{
  font-size: .78rem;
  padding: .48rem .78rem;
}

.cart-extra-btn{
  background: linear-gradient(180deg, rgba(255,235,59,0.34), rgba(245,158,11,0.16));
  border-color: rgba(245,158,11,0.32);
  color: #8a4b00;
}

.cart-customize-btn{
  background: linear-gradient(180deg, rgba(255,244,163,0.56), rgba(2,119,189,0.12));
  border-color: rgba(2,119,189,0.2);
  color: #0f4c81;
}

.cart-extra-btn:hover{
  background: linear-gradient(180deg, rgba(255,235,59,0.42), rgba(245,158,11,0.2));
  border-color: rgba(245,158,11,0.42);
  box-shadow: 0 12px 24px rgba(245,158,11,0.12);
}

.cart-customize-btn:hover{
  background: linear-gradient(180deg, rgba(255,244,163,0.68), rgba(2,119,189,0.18));
  border-color: rgba(2,119,189,0.28);
  box-shadow: 0 12px 24px rgba(2,119,189,0.12);
}

.cart-note-badge{
  align-items: center;
  background: rgba(255,235,59,0.28);
  border: 1px solid rgba(249,168,37,0.34);
  border-radius: 999px;
  color: #7c4a03;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  padding: .32rem .52rem;
  text-transform: uppercase;
}

.cart-extra-badge{
  align-items: center;
  background: rgba(245,158,11,0.16);
  border: 1px solid rgba(245,158,11,0.24);
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  padding: .28rem .5rem;
  text-transform: uppercase;
}

.cart-line-extras{
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .7rem;
}

.cart-line-extra{
  align-items: center;
  color: #4b5563;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  line-height: 1.45;
}

.cart-line-extra__name{
  color: #1f2937;
  font-size: .86rem;
  font-weight: 600;
}

.cart-line-extra__price{
  color: #9a3412;
  font-size: .82rem;
  font-weight: 700;
}

.cart-line-note{
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .7rem;
}

.cart-line-note__text{
  color: #374151;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.45;
}

.cart-note-modal{
  align-items: center;
  box-sizing: border-box;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 1rem;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 120;
}

.cart-note-modal.is-open{
  opacity: 1;
  pointer-events: auto;
}

.cart-note-modal__backdrop{
  background: rgba(17,24,39,0.68);
  border: 0;
  cursor: pointer;
  inset: 0;
  margin: 0;
  padding: 0;
  position: absolute;
}

.cart-note-modal__dialog{
  background: linear-gradient(180deg, #fffdf3 0%, #ffffff 58%);
  border: 1px solid rgba(2,119,189,0.12);
  border-radius: 1.35rem;
  box-shadow: 0 28px 70px rgba(17,24,39,0.26);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: .95rem;
  max-width: min(560px, 100%);
  overflow: hidden;
  padding: 1.1rem;
  position: relative;
  transform: translateY(10px) scale(.985);
  transition: transform 180ms ease;
  width: min(560px, calc(100vw - 2rem));
  z-index: 1;
}

.cart-note-modal.is-open .cart-note-modal__dialog{
  transform: translateY(0) scale(1);
}

.cart-note-modal__header{
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.cart-note-modal__copy{
  min-width: 0;
}

.cart-note-modal__kicker{
  color: #0f4c81;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .09em;
  margin: 0 0 .15rem;
  text-transform: uppercase;
}

.cart-note-modal__title{
  color: #111827;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
}

.cart-note-modal__close{
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.55rem;
  height: 2.2rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  width: 2.2rem;
}

.cart-note-modal__close:hover{
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.cart-note-modal__close:focus-visible{
  outline: 2px solid var(--simpson-blue);
  outline-offset: 2px;
}

.cart-note-modal__hint{
  color: #475569;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.cart-note-modal__input{
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  box-sizing: border-box;
  color: #111827;
  display: block;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.5;
  max-width: 100%;
  min-height: 8.5rem;
  padding: .9rem .95rem;
  resize: vertical;
  width: 100%;
}

.cart-note-modal__input:focus{
  border-color: var(--simpson-blue);
  box-shadow: 0 0 0 4px rgba(2,119,189,0.16);
  outline: none;
}

.cart-note-modal__error{
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: .85rem;
  color: #b91c1c;
  font-size: .84rem;
  font-weight: 700;
  padding: .7rem .8rem;
}

.cart-note-modal__footer{
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
}

.cart-note-modal__counter{
  color: #64748b;
  font-size: .77rem;
  font-weight: 800;
}

.cart-note-modal__counter.is-limit{
  color: #b45309;
}

.cart-note-modal__actions{
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: flex-end;
}

.cart-extras-modal{
  align-items: center;
  box-sizing: border-box;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 1rem;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 121;
}

.cart-extras-modal.is-open{
  opacity: 1;
  pointer-events: auto;
}

.cart-extras-modal__backdrop{
  background: rgba(17,24,39,0.72);
  border: 0;
  cursor: pointer;
  inset: 0;
  margin: 0;
  padding: 0;
  position: absolute;
}

.cart-extras-modal__dialog{
  background: linear-gradient(180deg, #fffdf3 0%, #ffffff 58%);
  border: 1px solid rgba(245,158,11,0.16);
  border-radius: 1.35rem;
  box-shadow: 0 28px 70px rgba(17,24,39,0.26);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: .95rem;
  max-width: min(580px, 100%);
  overflow: hidden;
  padding: 1.1rem;
  position: relative;
  transform: translateY(10px) scale(.985);
  transition: transform 180ms ease;
  width: min(580px, calc(100vw - 2rem));
  z-index: 1;
}

.cart-extras-modal.is-open .cart-extras-modal__dialog{
  transform: translateY(0) scale(1);
}

.cart-extras-modal__header{
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.cart-extras-modal__copy{
  min-width: 0;
}

.cart-extras-modal__kicker{
  color: #9a3412;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .09em;
  margin: 0 0 .15rem;
  text-transform: uppercase;
}

.cart-extras-modal__title{
  color: #111827;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
}

.cart-extras-modal__close{
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 999px;
  color: #9a3412;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.55rem;
  height: 2.2rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  width: 2.2rem;
}

.cart-extras-modal__close:hover{
  background: #ffedd5;
  border-color: #fb923c;
  color: #7c2d12;
}

.cart-extras-modal__close:focus-visible{
  outline: 2px solid #fb923c;
  outline-offset: 2px;
}

.cart-extras-modal__hint{
  color: #475569;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.cart-extras-modal__totals{
  background: rgba(255,247,237,0.8);
  border: 1px solid rgba(245,158,11,0.18);
  border-radius: 1rem;
  display: grid;
  gap: .55rem;
  padding: .85rem .95rem;
}

.cart-extras-modal__total-row{
  align-items: center;
  color: #374151;
  display: flex;
  font-size: .9rem;
  font-weight: 700;
  justify-content: space-between;
  gap: .75rem;
}

.cart-extras-modal__total-row strong{
  color: #111827;
  font-size: .98rem;
}

.cart-extras-modal__section{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(226,232,240,0.95);
  border-radius: 1rem;
  display: grid;
  gap: .75rem;
  padding: .95rem;
}

.cart-extras-modal__section--note{
  background: rgba(248,250,252,0.88);
}

.cart-extras-modal__section-head{
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: space-between;
}

.cart-extras-modal__section-title{
  color: #111827;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.cart-extras-modal__section-caption{
  color: #92400e;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cart-extras-modal__empty{
  background: rgba(255,247,237,0.8);
  border: 1px dashed rgba(245,158,11,0.28);
  border-radius: .95rem;
  color: #7c2d12;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.5;
  padding: .9rem .95rem;
}

.cart-extras-modal__list{
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: min(340px, 45vh);
  overflow-y: auto;
  padding-right: .2rem;
}

.cart-extras-modal__option{
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  cursor: pointer;
  display: flex;
  gap: .8rem;
  padding: .9rem .95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.cart-extras-modal__option:hover{
  border-color: rgba(245,158,11,0.34);
  box-shadow: 0 12px 22px rgba(245,158,11,0.08);
}

.cart-extras-modal__checkbox{
  accent-color: #f59e0b;
  flex: 0 0 auto;
  height: 1.05rem;
  margin-top: .12rem;
  width: 1.05rem;
}

.cart-extras-modal__option-copy{
  align-items: center;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: space-between;
}

.cart-extras-modal__option-name{
  color: #111827;
  font-size: .98rem;
  font-weight: 700;
}

.cart-extras-modal__option-price{
  color: #9a3412;
  font-size: .9rem;
  font-weight: 800;
}

.cart-extras-modal__note-input{
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  box-sizing: border-box;
  color: #111827;
  display: block;
  font-size: .96rem;
  font-weight: 600;
  line-height: 1.5;
  max-width: 100%;
  min-height: 7.5rem;
  padding: .85rem .95rem;
  resize: vertical;
  width: 100%;
}

.cart-extras-modal__note-input:focus{
  border-color: var(--simpson-blue);
  box-shadow: 0 0 0 4px rgba(2,119,189,0.16);
  outline: none;
}

.cart-extras-modal__note-meta{
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: .78rem;
  font-weight: 700;
  gap: .65rem;
  justify-content: space-between;
}

.cart-extras-modal__note-tip{
  line-height: 1.45;
}

.cart-extras-modal__note-counter{
  color: #64748b;
  font-size: .77rem;
  font-weight: 800;
}

.cart-extras-modal__note-counter.is-limit{
  color: #b45309;
}

.cart-extras-modal__error{
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: .85rem;
  color: #b91c1c;
  font-size: .84rem;
  font-weight: 700;
  padding: .7rem .8rem;
}

.cart-extras-modal__footer{
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
}

.cart-extras-modal__selected{
  color: #92400e;
  font-size: .8rem;
  font-weight: 800;
}

.cart-extras-modal__actions{
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: flex-end;
}

/* Success page layout */
.success-final-card{
  min-height: calc(100vh - 6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.success-final-card.hidden{
  display: none;
}

.success-final-inner{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 640px){
  .success-final-card{
    padding: 3rem;
  }
}

@media (max-width: 640px){
  .home-menu-lightbox{
    padding: .65rem;
  }

  .cart-note-modal{
    padding: .75rem;
  }

  .cart-extras-modal{
    padding: .75rem;
  }

  .cart-note-modal__dialog{
    border-radius: 1.1rem;
    padding: .95rem;
    width: min(560px, calc(100vw - 1.5rem));
  }

  .cart-extras-modal__dialog{
    border-radius: 1.1rem;
    padding: .95rem;
    width: min(580px, calc(100vw - 1.5rem));
  }

  .cart-note-modal__title{
    font-size: 1.22rem;
  }

  .cart-extras-modal__title{
    font-size: 1.22rem;
  }

  .cart-note-modal__footer{
    align-items: stretch;
    flex-direction: column;
  }

  .cart-extras-modal__footer{
    align-items: stretch;
    flex-direction: column;
  }

  .cart-note-modal__actions{
    width: 100%;
  }

  .cart-extras-modal__actions{
    width: 100%;
  }

  .cart-note-modal__actions > *{
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .cart-extras-modal__actions > *{
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .cart-extras-modal__option{
    padding: .82rem .85rem;
  }

  .cart-extras-modal__option-copy{
    align-items: flex-start;
    flex-direction: column;
  }

  .home-menu-lightbox__dialog{
    border-radius: .85rem;
    max-height: calc(100dvh - 1.3rem);
  }

  .home-menu-lightbox__header{
    padding: .62rem .72rem;
  }

  .home-menu-lightbox__title{
    font-size: .86rem;
  }

  .home-menu-lightbox__media{
    max-height: calc(100dvh - 5.2rem);
    min-height: 12rem;
    padding: .7rem;
  }

  .home-menu-lightbox__image{
    max-height: calc(100dvh - 7rem);
  }
}

@media (prefers-reduced-motion: reduce){
  .home-menu-image-trigger img,
  .home-menu-lightbox,
  .home-menu-lightbox__dialog,
  .home-menu-lightbox__close,
  .cart-note-btn,
  .cart-extra-btn,
  .cart-note-modal,
  .cart-note-modal__dialog,
  .cart-note-modal__close,
  .cart-extras-modal,
  .cart-extras-modal__dialog,
  .cart-extras-modal__close,
  .cart-extras-modal__option{
    transition: none;
  }
}
