/* ============================================================
   PAULIM FRUTAS - CSS Global
   ============================================================ */

/* ---- Variáveis ---- */
:root {
  --verde: #2E7D32;
  --verde-dark: #1B5E20;
  --verde-light: #4CAF50;
  --amarelo: #F9A825;
  --amarelo-light: #FFF176;
  --laranja: #E65100;
  --laranja-light: #FF6D00;
  --branco: #FAFAFA;
  --cinza-claro: #F5F5F5;
  --cinza: #E0E0E0;
  --cinza-medio: #9E9E9E;
  --cinza-escuro: #424242;
  --preto: #212121;
  --sombra: 0 2px 12px rgba(0,0,0,0.10);
  --sombra-hover: 0 6px 24px rgba(0,0,0,0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
  --font: 'Poppins', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--branco);
  color: var(--preto);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ---- Typography ---- */
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { color: var(--cinza-escuro); }

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--verde);
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  transition: var(--transition);
}
#header.scrolled { background: var(--verde-dark); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 16px;
}
.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--amarelo);
}
.logo-text { color: white; }
.logo-text .brand { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; }
.logo-text .slogan { font-size: 0.68rem; opacity: 0.85; }

.nav-main { display: flex; align-items: center; gap: 4px; }
.nav-main a {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  transition: var(--transition);
}
.nav-main a:hover, .nav-main a.active {
  background: rgba(255,255,255,0.18);
  color: white;
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-icon {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  color: white;
  font-size: 1.1rem;
  transition: var(--transition);
  text-decoration: none;
}
.btn-icon:hover { background: rgba(255,255,255,0.25); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--amarelo); color: var(--preto);
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  min-width: 18px;
}
.cart-count.hidden { display: none; }

.btn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  padding: 4px;
}
.btn-hamburger span {
  display: block; height: 2px; background: white;
  border-radius: 2px; transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: var(--verde-dark);
  z-index: 999;
  flex-direction: column;
  padding: 12px 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: rgba(255,255,255,0.9);
  padding: 12px 24px;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.mobile-menu a:hover { background: rgba(255,255,255,0.1); color: white; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amarelo);
  color: var(--preto);
  box-shadow: 0 3px 10px rgba(249,168,37,0.35);
}
.btn-primary:hover {
  background: #F57F17;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(249,168,37,0.45);
}
.btn-secondary {
  background: transparent;
  color: var(--verde);
  border: 2px solid var(--verde);
}
.btn-secondary:hover { background: var(--verde); color: white; }
.btn-danger { background: #c62828; color: white; }
.btn-danger:hover { background: #b71c1c; }
.btn-green { background: var(--verde); color: white; }
.btn-green:hover { background: var(--verde-dark); }
.btn-laranja { background: var(--laranja); color: white; }
.btn-laranja:hover { background: #BF360C; }
.btn-sm { padding: 6px 14px; font-size: 0.78rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-promo { background: var(--laranja); color: white; }
.badge-novo { background: var(--verde); color: white; }
.badge-esgotado { background: var(--cinza-escuro); color: white; }

/* ============================================================
   CARDS DE PRODUTO
   ============================================================ */
.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: var(--transition);
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); }

.product-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--cinza-claro);
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.07); }
.product-card-badge {
  position: absolute; top: 10px; left: 10px;
}

.product-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 6px;
}
.product-card-category {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--verde);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--preto);
  line-height: 1.3;
}
.product-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--laranja);
  margin-top: auto;
}
.product-card-price .from { font-size: 0.7rem; color: var(--cinza-medio); font-weight: 400; }
.product-card-actions {
  padding: 0 16px 16px;
  display: flex; gap: 8px;
}
.product-card-actions .btn { flex: 1; font-size: 0.78rem; padding: 8px 10px; }

/* ============================================================
   SECTION STYLES
   ============================================================ */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 { color: var(--verde-dark); margin-bottom: 8px; }
.section-title p { color: var(--cinza-medio); font-size: 0.95rem; }
.section-title .divider {
  width: 60px; height: 4px;
  background: linear-gradient(to right, var(--verde), var(--amarelo));
  border-radius: 2px;
  margin: 12px auto 0;
}

section.pad { padding: 70px 0; }
section.pad-sm { padding: 40px 0; }

/* ============================================================
   FLOATING BUTTONS
   ============================================================ */
.float-whatsapp {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 900;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.55rem;
  color: white;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: var(--transition);
  animation: pulse-wa 2.5s infinite;
}
.float-whatsapp:hover { transform: scale(1.12); box-shadow: 0 6px 28px rgba(37,211,102,0.6); }
@keyframes pulse-wa {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
  50% { box-shadow: 0 4px 28px rgba(37,211,102,0.7), 0 0 0 8px rgba(37,211,102,0.1); }
}

.float-top {
  position: fixed;
  bottom: 24px; left: 24px;
  z-index: 900;
  width: 48px; height: 48px;
  background: var(--verde);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: white;
  box-shadow: var(--sombra);
  transition: var(--transition);
  opacity: 0; pointer-events: none;
}
.float-top.visible { opacity: 1; pointer-events: all; }
.float-top:hover { background: var(--verde-dark); transform: translateY(-2px); }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--verde-dark);
  color: rgba(255,255,255,0.85);
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-about .logo-wrap { margin-bottom: 14px; }
.footer-about p { font-size: 0.85rem; line-height: 1.7; opacity: 0.8; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  color: white; font-size: 0.9rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--amarelo); color: var(--preto); }

.footer-col h4 { color: white; margin-bottom: 16px; font-size: 0.95rem; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.85rem; opacity: 0.8; transition: var(--transition); }
.footer-col ul li a:hover { opacity: 1; color: var(--amarelo); }

.footer-contact-item {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 10px; font-size: 0.85rem; opacity: 0.85;
}
.footer-contact-item i { color: var(--amarelo); margin-top: 2px; }

.footer-bottom {
  padding: 16px 0;
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.6;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--cinza-escuro);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--cinza);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--preto);
  background: white;
  transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--verde); }
.form-control.error { border-color: #c62828; }
.form-control.success { border-color: var(--verde); }
.form-error { font-size: 0.76rem; color: #c62828; margin-top: 4px; display: block; }
.form-success { font-size: 0.76rem; color: var(--verde); margin-top: 4px; display: block; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23424242' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: #E8F5E9; color: #2E7D32; border-left: 4px solid var(--verde); }
.alert-error { background: #FFEBEE; color: #c62828; border-left: 4px solid #c62828; }
.alert-info { background: #E3F2FD; color: #1565C0; border-left: 4px solid #1565C0; }
.alert-warning { background: #FFFDE7; color: #F57F17; border-left: 4px solid var(--amarelo); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: white;
  border-radius: var(--radius);
  max-width: 600px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: var(--transition);
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--cinza);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 1.1rem; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--cinza-claro);
  font-size: 1rem; color: var(--cinza-escuro);
  cursor: pointer; transition: var(--transition);
}
.modal-close:hover { background: var(--cinza); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--cinza); display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--cinza-medio);
  padding: 12px 0;
}
.breadcrumb a { color: var(--verde); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb i { font-size: 0.6rem; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 90px; right: 24px;
  z-index: 5000;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 300px;
}
.toast {
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  padding: 12px 16px;
  font-size: 0.85rem;
  display: flex; align-items: center; gap: 10px;
  animation: slideInToast 0.3s ease;
  border-left: 4px solid var(--verde);
}
.toast.error { border-color: #c62828; }
.toast.warning { border-color: var(--amarelo); }
.toast i { font-size: 1rem; }
.toast.success i { color: var(--verde); }
.toast.error i { color: #c62828; }
.toast.warning i { color: var(--amarelo); }
@keyframes slideInToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   PAGE HERO (internal pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-dark) 100%);
  padding: 100px 0 40px;
  margin-top: 70px;
  color: white;
}
.page-hero h1 { color: white; }
.page-hero p { color: rgba(255,255,255,0.8); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--cinza-medio);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--cinza-escuro); margin-bottom: 8px; }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   QUANTITY CONTROL
   ============================================================ */
.qty-control {
  display: flex; align-items: center; gap: 0;
  border: 2px solid var(--cinza);
  border-radius: 25px;
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 34px; height: 34px;
  background: var(--cinza-claro);
  color: var(--cinza-escuro);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  border: none; cursor: pointer;
}
.qty-btn:hover { background: var(--verde); color: white; }
.qty-input {
  width: 44px; height: 34px;
  text-align: center;
  border: none; outline: none;
  font-size: 0.9rem; font-weight: 600;
  font-family: var(--font);
}

/* ============================================================
   PRICE TAG
   ============================================================ */
.price-tag {
  display: flex; align-items: baseline; gap: 6px;
}
.price-old { font-size: 0.8rem; color: var(--cinza-medio); text-decoration: line-through; }
.price-current { font-size: 1.4rem; font-weight: 700; color: var(--laranja); }
.price-small .price-current { font-size: 1.1rem; }

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--cinza); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  background: transparent;
  color: var(--cinza-medio);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: none;
  transition: var(--transition);
  position: relative;
  bottom: -2px;
}
.tab-btn.active {
  color: var(--verde);
  border-bottom: 2px solid var(--verde);
  background: rgba(46,125,50,0.05);
}
.tab-btn:hover { color: var(--verde-dark); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================================
   STEPS (checkout)
   ============================================================ */
.steps {
  display: flex; align-items: center;
  gap: 0; margin-bottom: 32px;
}
.step {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
}
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  border: 2px solid var(--cinza);
  background: white; color: var(--cinza-medio);
  transition: var(--transition); flex-shrink: 0;
}
.step.active .step-circle { border-color: var(--verde); background: var(--verde); color: white; }
.step.done .step-circle { border-color: var(--verde-light); background: var(--verde-light); color: white; }
.step-label { font-size: 0.8rem; font-weight: 600; color: var(--cinza-medio); }
.step.active .step-label, .step.done .step-label { color: var(--verde); }
.step-line { flex: 1; height: 2px; background: var(--cinza); margin: 0 8px; }
.step-line.done { background: var(--verde-light); }

/* ============================================================
   TABLE STYLES
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--cinza-claro);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cinza-escuro);
  border-bottom: 2px solid var(--cinza);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cinza);
  font-size: 0.88rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cinza-claro); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--sombra); background: white; }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.status-pendente { background: #FFF3E0; color: #E65100; }
.status-aprovado { background: #E8F5E9; color: #2E7D32; }
.status-preparo { background: #E3F2FD; color: #1565C0; }
.status-entrega { background: #F3E5F5; color: #6A1B9A; }
.status-entregue { background: #E8F5E9; color: #1B5E20; }
.status-cancelado { background: #FFEBEE; color: #B71C1C; }
.status-confirmado { background: #E8F5E9; color: #2E7D32; }
.status-nao-confirmado { background: #FFF3E0; color: #E65100; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-main { display: none; }
  .btn-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr; }
  section.pad { padding: 48px 0; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 14px; }
}
