/* ==================== FOOTER POSITIONING ==================== */

.footer {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 10px auto;
  width: 100%;
  padding: 0 1rem 3rem; /* remove top padding to colar na main */
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.footer-branding {
  max-width: 500px;
}

.footer-cta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

.footer-location {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #f1a5c6, transparent);
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
}

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

@media (min-width: 768px) {
  .footer-container {
    padding: 0 2rem 4rem; /* sem top padding em telas médias */
    gap: 3rem;
  }

  .footer-main {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    justify-items: start;
    text-align: left;
  }

  .footer-branding {
    max-width: none;
  }

  .footer-cta {
    align-items: flex-start;
    width: auto;
  }

  .footer-location {
    align-items: flex-start;
  }
}

@media (min-width: 1024px) {
  .footer-container {
    padding: 0 4rem 5rem; /* sem top padding em telas grandes */
  }

  .footer-main {
    grid-template-columns: 3fr 1fr 1fr;
    gap: 4rem;
  }
}

/* ==================== ANIMATIONS ==================== */

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.animate-pulse {
  animation: heartbeat 1.5s ease-in-out infinite;
}

/* ==================== UTILITY ==================== */

html {
  height: 100%;
}

body {
  min-height: 100vh; /* Garante que o corpo tenha pelo menos 100% da altura da tela */
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Evita rolagem horizontal acidental */
}

main {
  flex-grow: 1; /* O segredo: faz o MAIN crescer para ocupar todo o espaço vazio, empurrando o footer */
  width: 100%;  /* Garante largura total */
}

footer {
  flex-shrink: 0; /* Garante que o footer nunca seja "esmagado" */
  width: 100%;
}

/* ==================== CATEGORY BAR ==================== */

.category-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0 auto 2rem;
}

.cat-pill {
  padding: 0.65rem 1.8rem;
  border-radius: 999px;
  border: 2px solid #e9cfc6;
  background: #fff7f2;
  color: #304550;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(0,0,0,0.04);
  transition: all 260ms cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.cat-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(212, 140, 129, 0.18);
  border-color: #e1b3a8;
}

.cat-pill.active {
  background: #d48c81;
  color: #fdf7f4;
  border-color: #d48c81;
  box-shadow: 0 12px 28px rgba(212, 140, 129, 0.28);
}

/* ==================== INTERACTIVE CARDS ==================== */

.card-anim {
  position: relative;
  will-change: transform, box-shadow;
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 800ms cubic-bezier(0.22, 1, 0.36, 1),
              filter 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card-hidden {
  display: none;
}

.card-anim:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(230, 163, 153, 0.22),
              0 4px 12px rgba(0, 0, 0, 0.04);
}

/* soft highlight in the top-right corner */
.card-anim::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 28px;
  background: radial-gradient(120px 60px at 100% 0, rgba(230,163,153,0.14), transparent 70%);
  opacity: 0;
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.card-anim:hover::before { opacity: 1; }

.card-anim img {
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card-anim:hover img { transform: scale(1.03); }

.card-anim .pedir-btn {
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 380ms cubic-bezier(0.22, 1, 0.36, 1),
              background-color 260ms ease;
}

.card-anim:hover .pedir-btn {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(230,163,153,0.25);
}

.card-anim .like-btn {
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.card-anim:hover .like-btn { transform: scale(1.03); }

/* ==================== MODAL ==================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  padding: 1rem;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

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

.modal-container {
  background: #F8F6F1;
  border-radius: 24px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  animation: modalSlideUp 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: #263740;
  cursor: pointer;
  transition: all 180ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.modal-body {
  padding: 1.5rem;
}

.product-info {
  background: white;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.qty-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e9d5cf;
  border: none;
  color: #263740;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: #d4b8b0;
  transform: scale(1.05);
}

.qty-input {
  width: 64px;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  border: 2px solid #e9d5cf;
  border-radius: 12px;
  padding: 0.5rem;
  background: white;
  color: #263740;
}

.modal-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e9d5cf;
  border-radius: 12px;
  font-size: 0.9375rem;
  background: white;
  color: #263740;
  transition: all 200ms ease;
}

.modal-input:focus {
  outline: none;
  border-color: #E6A399;
  box-shadow: 0 0 0 3px rgba(230, 163, 153, 0.1);
}

.modal-input::placeholder {
  color: #9ca3af;
}

.modal-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(to right, #22c55e, #16a34a);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 260ms ease;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
}

.modal-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.35);
}

.modal-submit:active {
  transform: translateY(0);
}

.delivery-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid #e9d5cf;
  border-radius: 12px;
  background: white;
  color: #263740;
  cursor: pointer;
  transition: all 200ms ease;
}

.delivery-option:hover {
  border-color: #d4b8b0;
  transform: translateY(-2px);
}

.delivery-option.active {
  border-color: #E6A399;
  background: rgba(230, 163, 153, 0.1);
  box-shadow: 0 0 0 3px rgba(230, 163, 153, 0.1);
}

.delivery-option i {
  font-size: 1.5rem;
}

.delivery-option span {
  font-weight: 600;
  font-size: 0.875rem;
}
/* ==================== CARRINHO (DRAWER) ==================== */

.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 500px;
  height: 100%;
  background: #F8F6F1;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  right: 0;
}

.cart-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: #F8F6F1;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #F8F6F1;
}

.qty-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #263740;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.qty-btn-cart {
  width: 2rem;
  height: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  color: #263740;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.75rem;
}

.qty-btn-cart:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.qty-input {
  width: 3rem;
  text-align: center;
  font-weight: bold;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem;
}

/* Overlay para fechar drawer */
.cart-drawer::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: -1;
}

.cart-drawer.active::before {
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 640px) {
  .cart-drawer {
    max-width: 100%;
  }
}