/* Reset Básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #b05260;    /* Rosa terracota */
  --primary-hover: #8f3f4c;
  --secondary-color: #7a9a7a;  /* Verde sálvia */
  --secondary-hover: #5f7a5f;
  --bg-color: #f5f3e9;         /* Creme delicado */
  --card-bg: #ffffff;
  --text-color: #4a4441;       /* Marrom suave */
  --text-muted: #786f6a;
  
  --shadow-soft: 0 6px 20px rgba(176, 82, 96, 0.08);
  --shadow-hover: 0 12px 30px rgba(176, 82, 96, 0.18);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.2);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Toast de Notificação */
.toast {
  position: fixed;
  top: 25px;
  right: 25px;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.8rem 1.4rem;
  border-radius: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 2000;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: slideInToast 0.4s ease;
}

.toast.toast-error {
  background-color: #d93838;
}

@keyframes slideInToast {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Header / Hero */
.hero {
  background-color: var(--bg-color);
  text-align: center;
  padding: 1rem 1rem 0.5rem 1rem;
  position: relative;
}

.cart-top-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background-color: #ffffff;
  color: var(--primary-color);
  border: 1px solid #e0dad0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 10;
}

.cart-top-btn:hover {
  transform: scale(1.1) rotate(-5deg);
  border-color: var(--primary-color);
  box-shadow: 0 6px 15px rgba(176, 82, 96, 0.2);
}

.cart-top-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-logo {
  width: 100%;
  max-width: 260px;
  height: auto;
  margin-bottom: 0.2rem;
  display: block;
  transition: transform 0.4s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
}

.hero .description {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.8rem;
}

.social-links-top a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.social-links-top a:hover {
  color: var(--primary-hover);
  transform: translateY(-2px);
}

/* Como Funciona */
.how-it-works {
  background-color: #ffffff;
  border-top: 1px dashed #e0dad0;
  border-bottom: 1px dashed #e0dad0;
  padding: 1.5rem 1rem;
}

.steps-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  flex: 1;
  transition: transform 0.3s ease;
}

.step-card:hover {
  transform: translateY(-3px);
}

.step-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-color);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 0.5rem auto;
  transition: all 0.3s ease;
}

.step-card:hover .step-icon {
  background-color: var(--primary-color);
  color: white;
}

.step-card h3 {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  color: var(--primary-color);
  margin-bottom: 0.2rem;
}

.step-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.step-divider {
  color: #d0c8bd;
  font-size: 1.2rem;
}

/* Container Principal */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* Pesquisa */
.search-box {
  max-width: 480px;
  margin: 0 auto 1.5rem auto;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.search-box input {
  width: 100%;
  padding: 0.8rem 1.4rem 0.8rem 3rem;
  font-size: 0.95rem;
  border: 2px solid #e0dad0;
  border-radius: 25px;
  outline: none;
  background-color: #ffffff;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(122, 154, 122, 0.25);
}

.search-box input:focus + .search-icon {
  color: var(--secondary-color);
}

/* Categorias */
.categories {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.cat-btn {
  background-color: #ffffff;
  border: 1px solid #e0dad0;
  padding: 0.6rem 1.3rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cat-btn:hover {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cat-btn.active {
  background-color: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(122, 154, 122, 0.3);
}

/* Grid de Produtos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  border: 1px solid #f0ebe1;
  position: relative;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: fadeInCard 0.4s ease forwards;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: #e5ded3;
}

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: white;
  z-index: 2;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.badge-mais-vendido { background-color: #d97706; }
.badge-novidade { background-color: #2563eb; }
.badge-artesanal { background-color: var(--secondary-color); }

.card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img {
  transform: scale(1.06);
}

.card-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: white;
  z-index: 1;
}

.card-title {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.4rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.4;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.quantity-controls {
  display: flex;
  align-items: center;
  background-color: var(--bg-color);
  border-radius: 20px;
  padding: 0.2rem 0.5rem;
  border: 1px solid #e0dad0;
  transition: border-color 0.2s ease;
}

.quantity-controls:hover {
  border-color: var(--secondary-color);
}

.qty-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1rem;
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 0.15s ease;
}

.qty-btn:active {
  transform: scale(0.85);
}

.qty-number {
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 22px;
  text-align: center;
}

/* Barra Flutuante do Carrinho */
.cart-float-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 480px;
  background-color: var(--primary-color);
  color: white;
  padding: 0.85rem 1.6rem;
  border-radius: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 25px rgba(176, 82, 96, 0.4);
  cursor: pointer;
  z-index: 99;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-float-bar:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.02);
  background-color: var(--primary-hover);
}

.cart-float-bar.hidden { display: none !important; }

.cart-float-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
}

.cart-badge {
  background-color: white;
  color: var(--primary-color);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.85rem;
}

.cart-total-price {
  font-weight: 700;
  font-size: 1.1rem;
}

/* Modal Overlay com Blur */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.hidden { display: none !important; }

.modal-content {
  background: white;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  padding: 1.5rem;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0dad0;
  padding-bottom: 0.8rem;
}

.modal-header h2 {
  font-family: 'Lora', serif;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-btn:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}

/* Formulário do Bolo Recheado */
.cake-form-body {
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-color);
  margin-top: 0.2rem;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #e0dad0;
  border-radius: 12px;
  font-size: 0.9rem;
  outline: none;
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.form-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(122, 154, 122, 0.2);
}

.form-input-file {
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 100%;
}

.form-input-file::-webkit-file-upload-button {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.65rem 1.2rem;
  border-radius: 20px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  cursor: pointer;
  margin-right: 0.8rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(122, 154, 122, 0.2);
}

.form-input-file::-webkit-file-upload-button:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-1px);
}

.radio-group {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.radio-group label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.form-row {
  display: flex;
  gap: 0.8rem;
}

.form-col {
  flex: 1;
}

.file-preview-info {
  font-size: 0.8rem;
  color: var(--secondary-color);
  font-weight: 600;
}

.delivery-method-box {
  background-color: var(--bg-color);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid #e0dad0;
}

.btn-add-custom-cake {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.8rem;
  transition: all 0.2s ease;
}

.btn-add-custom-cake:hover {
  background-color: var(--secondary-hover);
  box-shadow: 0 4px 12px rgba(122, 154, 122, 0.3);
}

/* Personalização do Tema do Flatpickr */
.flatpickr-calendar {
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
  border: 1px solid #e0dad0 !important;
  font-family: 'Nunito', sans-serif !important;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
}

.flatpickr-day:hover {
  background: #e8f0e8 !important;
}

.flatpickr-months .flatpickr-month {
  color: var(--primary-color) !important;
  fill: var(--primary-color) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 700 !important;
}

.flatpickr-time input:hover, 
.flatpickr-time input:focus {
  background: #f5f3e9 !important;
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid #f5f3e9;
}

.cart-item-info h4 {
  font-size: 0.95rem;
  color: var(--text-color);
}

.cart-item-details {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

.cart-item-info p {
  font-size: 0.85rem;
  color: var(--secondary-color);
  font-weight: 700;
  margin-top: 0.2rem;
}

.modal-footer {
  border-top: 1px solid #e0dad0;
  padding-top: 1rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.btn-checkout {
  width: 100%;
  background-color: #25d366;
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-checkout:hover {
  background-color: #1da851;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Botões do Carrinho (Limpar, Editar e Deletar) */
.clear-cart-btn {
  background: none;
  border: 1px solid #e0dad0;
  color: #d93838;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.clear-cart-btn:hover {
  background-color: #fff0f0;
  border-color: #d93838;
}

.btn-edit-item {
  background-color: #f5f3e9;
  border: 1px solid #e0dad0;
  color: var(--primary-color);
  padding: 0.35rem 0.7rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-edit-item:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-remove-item {
  background: none;
  border: none;
  color: #d93838;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-remove-item:hover {
  background-color: #fff0f0;
  transform: scale(1.1);
}

/* Modal de Confirmação Personalizado (Limpar Carrinho) */
.confirm-modal-content {
  max-width: 380px !important;
  text-align: center;
  padding: 1.8rem 1.5rem !important;
  align-items: center;
}

.confirm-icon {
  width: 55px;
  height: 55px;
  background-color: #fff0f0;
  color: #d93838;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.confirm-modal-content h3 {
  font-family: 'Lora', serif;
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.confirm-modal-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1.4rem;
}

.confirm-buttons {
  display: flex;
  gap: 0.8rem;
  width: 100%;
}

.btn-confirm-cancel {
  flex: 1;
  background-color: var(--bg-color);
  border: 1px solid #e0dad0;
  color: var(--text-color);
  padding: 0.7rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm-cancel:hover {
  background-color: #e8e3d5;
}

.btn-confirm-accept {
  flex: 1;
  background-color: #d93838;
  border: none;
  color: white;
  padding: 0.7rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm-accept:hover {
  background-color: #b82828;
  box-shadow: 0 4px 12px rgba(217, 56, 56, 0.3);
}

.whatsapp-float-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 55px;
  height: 55px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  text-decoration: none;
  z-index: 98;
  transition: all 0.3s ease;
  animation: pulseWhatsApp 3s infinite ease-in-out;
}

.whatsapp-float-btn:hover {
  transform: scale(1.12);
  background-color: #1da851;
}

@keyframes pulseWhatsApp {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.hidden { display: none !important; }

footer {
  text-align: center;
  padding: 1.8rem;
  background-color: #554a48;
  color: #e5ded8;
  font-size: 0.9rem;
  margin-top: auto;
}

.social-links-footer { margin-top: 0.5rem; }
.social-links-footer a { color: #e5ded8; text-decoration: none; }

/* Responsividade */
@media (max-width: 900px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .steps-wrapper { flex-direction: column; }
  .step-divider { transform: rotate(90deg); margin: 0.2rem 0; }
  .form-row { flex-direction: column; gap: 0.4rem; }
}

@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr; }
  .brand-logo { max-width: 210px; }
}