/* ==========================================================
   ALVORADA PRODUTOS AGROPECUÁRIOS - Réplica de demonstração
   ========================================================== */
:root {
  --green-dark: #1b5e20;
  --green: #2e7d32;
  --green-light: #4caf50;
  --green-bg: #eef7ee;
  --text-dark: #292929;
  --text-gray: #4f4f4f;
  --border: #e0e0e0;
  --orange: #ff6f00;
  --whatsapp: #25d366;
  --radius: 8px;
  --max-width: 1280px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  background: #fff;
  scroll-behavior: smooth;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.hide-mobile { display: inline; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.85rem; border: none;
  transition: all .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #1eb455; }
.btn-whatsapp-sm { background: var(--whatsapp); color: #fff; padding: 8px 14px; border-radius: 6px; font-size: .8rem; display: inline-flex; margin-top: 6px; }
.btn-ver { background: var(--green-dark); color: #fff; }
.btn-ver:hover { background: #0f3d12; }
.btn-lg { padding: 14px 24px; font-size: 1rem; width: 100%; justify-content: center; }
.btn-outline-sm { border: 1px solid #888; color: #ccc; padding: 6px 12px; border-radius: 6px; font-size: .8rem; }
.btn-admin-footer { background: var(--green-dark); color: #fff; padding: 8px 16px; border-radius: 20px; font-size: .8rem; }

/* ---------- TOP BAR ---------- */
.topbar { background: var(--green-dark); color: #fff; font-size: .78rem; }
.topbar-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 6px 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar-link { color: #e8f5e9; opacity: .95; }
.topbar-link:hover { opacity: 1; text-decoration: underline; }
.topbar-link.admin-btn { background: var(--orange); color: #fff; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.topbar-hours { color: #cfe9d1; }

/* ---------- HEADER ---------- */
.site-header { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 100; }
.header-main {
  max-width: var(--max-width); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 18px;
}
.mobile-menu-toggle { display: none; background: none; border: none; font-size: 1.4rem; color: var(--green-dark); }
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon { color: var(--green); font-size: 1.9rem; }
.logo-text { font-weight: 800; color: var(--green-dark); font-size: 1.15rem; line-height: 1.1; letter-spacing: .5px; }
.logo-text small { font-weight: 600; color: var(--text-gray); font-size: .6rem; letter-spacing: 1px; }

.search-form { flex: 1; display: flex; max-width: 560px; }
.search-input {
  flex: 1; padding: 11px 16px; border: 2px solid var(--green); border-right: none;
  border-radius: 20px 0 0 20px; font-size: .9rem; outline: none;
}
.search-btn { background: var(--green); color: #fff; border: none; padding: 0 20px; border-radius: 0 20px 20px 0; font-size: 1rem; }
.search-btn:hover { background: var(--green-dark); }

/* ---------- HEADER SEARCH ROW ---------- */
.header-search-row { flex: 1; display: flex; align-items: center; gap: 10px; }
.header-search-row .search-form { flex: 1; }

/* ---------- ADMIN HEADER BUTTON ---------- */
.btn-admin-header {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px;
  background: #ff6f00; color: #fff; border-radius: 20px; font-weight: 700; font-size: .82rem;
  white-space: nowrap; flex-shrink: 0; transition: background .2s;
}
.btn-admin-header:hover { background: #e65100; color: #fff; }

/* ---------- PERSONALIZATION HEADER ---------- */
#site-logo-custom { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#site-logo-custom img { max-height: 46px; width: auto; object-fit: contain; }
.header-person-company { font-size: .82rem; font-weight: 700; color: var(--green-dark); }
.header-person-phone { font-size: .72rem; color: var(--text-gray); }

.main-nav { background: var(--green); }
.main-nav-list { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; display: flex; overflow-x: auto; }
.main-nav-list li { flex-shrink: 0; }
.main-nav-list a {
  display: flex; align-items: center; gap: 6px; color: #fff; padding: 12px 16px;
  font-size: .82rem; font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: .3px;
}
.main-nav-list a:hover { background: var(--green-dark); }

/* ---------- MOBILE MENU ---------- */
.mobile-menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: none;
}
.mobile-menu {
  position: fixed; top: 0; left: -300px; width: 280px; height: 100%; background: #fff;
  z-index: 201; transition: left .25s ease; overflow-y: auto;
}
.mobile-menu.open { left: 0; }
.mobile-menu-overlay.open { display: block; }
.mobile-menu-header {
  background: var(--green-dark); color: #fff; padding: 18px; display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu-header button { background: none; border: none; color: #fff; font-size: 1.3rem; }
.mobile-search-form { display: flex; padding: 14px; gap: 6px; }
.mobile-search-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; }
.mobile-search-form button { background: var(--green); color: #fff; border: none; padding: 0 14px; border-radius: 6px; }
.mobile-menu-items { padding: 0 8px 20px; }
.mobile-menu-item {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; color: var(--text-dark);
  border-bottom: 1px solid var(--border); font-size: .9rem; font-weight: 500;
}
.mobile-menu-item i { color: var(--green); width: 20px; }
.mobile-menu-item.admin-mobile { color: var(--orange); font-weight: 700; }
.mobile-menu-item.admin-mobile i { color: var(--orange); }

/* ---------- HERO CAROUSEL ---------- */
.hero-carousel { position: relative; width: 100%; margin: 0; border-radius: 0; overflow: hidden; }
.hero-slides { position: relative; width: 100%; height: 700px; background: #ddd; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide-caption {
  position: absolute; left: 0; bottom: 0; top: 0; width: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 6% 8%; background: linear-gradient(90deg, rgba(0,40,10,.75) 0%, rgba(0,40,10,.35) 55%, transparent 100%);
  color: #fff; max-width: 640px;
}
.hero-slide-caption h2 { font-size: 2rem; margin: 0; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.hero-slide-caption p { font-size: 1rem; margin: 0; opacity: .95; }
.hero-slide-caption .btn { align-self: flex-start; margin-top: 4px; }
.hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.85);
  border: none; width: 40px; height: 40px; border-radius: 50%; color: var(--green-dark); font-size: 1rem; z-index: 5;
}
.hero-prev { left: 14px; } .hero-next { right: 14px; }
.hero-nav:hover { background: #fff; }
.hero-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: transparent; }
.hero-dot.active { background: #fff; }

/* ---------- SECTIONS ---------- */
.section { max-width: var(--max-width); margin: 40px auto; padding: 0 20px; }
.section-title {
  text-align: center; font-size: 1.5rem; font-weight: 800; color: var(--green-dark);
  margin-bottom: 24px; letter-spacing: .5px;
}
.section-title i { color: var(--orange); }

/* ---------- BRANDS CAROUSEL ---------- */
.brands-section { background: var(--green-bg); border-radius: var(--radius); padding: 30px 0; max-width: 100%; margin: 0; }
.brands-section .section-title { max-width: var(--max-width); margin: 0 auto 20px; padding: 0 20px; }
.brands-carousel { overflow: hidden; max-width: var(--max-width); margin: 0 auto; }
.brands-track { display: flex; gap: 20px; width: max-content; animation: brandsScroll 30s linear infinite; padding: 0 20px; }
.brands-carousel:hover .brands-track { animation-play-state: paused; }
@keyframes brandsScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.brand-card {
  flex-shrink: 0; width: 190px; height: 90px; background: #fff; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border-top: 4px solid var(--brand-color, var(--green));
  font-weight: 700; text-align: center; padding: 8px; color: var(--text-dark);
  transition: transform .2s;
}
.brand-card:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.brand-card span { font-size: .95rem; }

/* ---------- CATEGORY GRID ---------- */
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px;
}
.category-card {
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08);
  background: #fff; transition: transform .2s;
}
.category-card:hover { transform: translateY(-5px); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.category-card-img { aspect-ratio: 1/1; overflow: hidden; }
.category-card-img img { width: 100%; height: 100%; object-fit: cover; }
.category-card-label {
  padding: 10px; text-align: center; font-weight: 700; font-size: .82rem; color: var(--green-dark);
  background: #fff;
}
.category-card-label i { color: var(--orange); margin-right: 4px; }

/* ---------- OFFERS / PRODUCT GRID ---------- */
.offers-section { background: linear-gradient(180deg, #fff8f0 0%, #fff 100%); border-radius: var(--radius); padding: 30px 20px; }
.offers-header { text-align: center; margin-bottom: 24px; }
.offers-subtitle { color: var(--text-gray); margin-top: -14px; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }

.product-card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.offer-tag {
  position: absolute; top: 10px; left: 10px; background: var(--orange); color: #fff; font-size: .68rem;
  font-weight: 700; padding: 4px 9px; border-radius: 4px; z-index: 2; letter-spacing: .3px;
}
.discount-tag {
  position: absolute; top: 10px; right: 10px; background: var(--green-dark); color: #fff; font-size: .72rem;
  font-weight: 800; padding: 4px 8px; border-radius: 4px; z-index: 2;
}
.product-card-img-wrap { aspect-ratio: 1/1; overflow: hidden; background: #f8f8f8; }
.product-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-card-img-wrap img { transform: scale(1.06); }
.product-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-brand { font-size: .7rem; color: var(--green); font-weight: 700; text-transform: uppercase; }
.product-name { font-size: .9rem; font-weight: 600; margin: 0; line-height: 1.3; min-height: 2.4em; }
.product-name a:hover { color: var(--green); }
.product-price-wrap { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.product-old-price { text-decoration: line-through; color: #999; font-size: .8rem; }
.product-price { font-size: 1.2rem; font-weight: 800; color: var(--green-dark); }
.product-price-lg .product-price { font-size: 1.8rem; }
.product-card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.product-card-actions .btn { flex: 1; justify-content: center; padding: 9px 8px; font-size: .75rem; }

/* ---------- INSTITUTIONAL BANNER ---------- */
.institutional-banner-inner {
  display: flex; align-items: center; gap: 18px; background: var(--green-bg); border-radius: var(--radius);
  padding: 24px; justify-content: center; text-align: left;
}
.institutional-banner-inner i { font-size: 2.4rem; color: var(--green); }
.institutional-banner-inner h3 { margin: 0 0 4px; color: var(--green-dark); }
.institutional-banner-inner p { margin: 0; color: var(--text-gray); }

/* ---------- BREADCRUMB ---------- */
.breadcrumb { font-size: .85rem; color: var(--text-gray); margin-bottom: 18px; }
.breadcrumb a { color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- CATEGORY / BRAND PAGE ---------- */
.category-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; max-height: 260px; }
.category-hero img { width: 100%; height: 260px; object-fit: cover; filter: brightness(.6); }
.category-hero-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.category-hero-overlay h1 { color: #fff; font-size: 2rem; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.brand-page-header { background: var(--brand-color, var(--green)); border-radius: var(--radius); padding: 30px; margin-bottom: 20px; text-align: center; }
.brand-page-header h1 { color: #fff; margin: 0; text-transform: uppercase; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-gray); grid-column: 1/-1; }

/* ---------- PRODUCT DETAIL ---------- */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-detail-img { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #f8f8f8; }
.product-detail-img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.product-brand-link { color: var(--green); font-weight: 700; text-transform: uppercase; font-size: .8rem; }
.product-detail-info h1 { font-size: 1.6rem; margin: 8px 0 14px; color: var(--text-dark); }
.product-description { color: var(--text-gray); line-height: 1.6; margin: 16px 0; }
.product-detail-actions { margin: 20px 0; }
.product-detail-meta p { color: var(--text-gray); font-size: .85rem; margin: 6px 0; }
.product-detail-meta i { color: var(--green); width: 18px; }

/* ---------- STATIC PAGES ---------- */
.static-page { max-width: 800px; line-height: 1.7; }
.static-page h1 { color: var(--green-dark); }

/* ---------- FOOTER ---------- */
.site-footer { background: #1b1b1b; color: #ccc; margin-top: 40px; }
.footer-newsletter { background: var(--green-dark); }
.footer-newsletter-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 28px 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap; color: #fff;
}
.footer-newsletter-inner h3 { margin: 0 0 4px; font-size: 1.1rem; }
.footer-newsletter-inner p { margin: 0; opacity: .9; font-size: .85rem; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-input { padding: 10px 14px; border-radius: var(--radius); border: none; min-width: 240px; }

.footer-main {
  max-width: var(--max-width); margin: 0 auto; padding: 40px 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
}
.footer-col h4 { color: #fff; font-size: .9rem; text-transform: uppercase; margin: 0 0 14px; letter-spacing: .5px; }
.footer-col p, .footer-col address { font-size: .85rem; line-height: 1.7; color: #bbb; }
.footer-col a { color: #bbb; }
.footer-col a:hover { color: #fff; }
.footer-links li { margin-bottom: 8px; font-size: .85rem; }
.social-icons { display: flex; gap: 10px; }
.social-icons a {
  width: 36px; height: 36px; border-radius: 50%; background: #2c2c2c; display: flex;
  align-items: center; justify-content: center; font-size: 1rem;
}
.social-icons a:hover { background: var(--green); }
.payment-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-badge {
  background: #2c2c2c; padding: 6px 10px; border-radius: 6px; font-size: .75rem; display: flex; align-items: center; gap: 5px;
}
.security-badge { background: #2c2c2c; padding: 10px; border-radius: 6px; font-size: .8rem; display: flex; align-items: center; gap: 8px; color: #8fdc90; }
address { font-style: normal; }

.footer-bottom {
  border-top: 1px solid #333; padding: 18px 20px; max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .78rem; color: #888;
}

/* ---------- WHATSAPP FLOAT BUTTON ---------- */
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; width: 58px; height: 58px; background: var(--whatsapp);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.8rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); z-index: 150; animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ==========================================================
   RESPONSIVE - MOBILE
   ========================================================== */
@media (max-width: 900px) {
  .footer-main { grid-template-columns: repeat(2, 1fr); }
  .product-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .mobile-menu-toggle { display: block; }
  .main-nav { display: none; }
  .header-main { padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
  .logo-text { font-size: .9rem; }
  .logo-icon { font-size: 1.4rem; }
  .header-search-row { order: 3; flex-basis: 100%; margin-top: 4px; }
  .header-search-row .search-form { max-width: 100%; }
  .btn-admin-header { padding: 7px 12px; font-size: .75rem; }
  .hero-slide-caption { padding: 6% 6%; }
  .hero-slide-caption h2 { font-size: 1.2rem; }
  .hero-slide-caption p { font-size: .8rem; }
  .hero-slides { height: 380px; }
  .section { margin: 24px auto; padding: 0 14px; }
  .section-title { font-size: 1.15rem; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .category-card-label { font-size: .68rem; padding: 8px 4px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-actions { flex-direction: column; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
  .footer-newsletter-inner { flex-direction: column; text-align: center; }
  .newsletter-form { width: 100%; justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .institutional-banner-inner { flex-direction: column; text-align: center; }
  .whatsapp-float { width: 50px; height: 50px; font-size: 1.5rem; bottom: 16px; right: 16px; }
  .brand-card { width: 150px; height: 74px; }
  .topbar-inner { font-size: .68rem; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .product-name { min-height: unset; }
}

/* ---------- REPRESENTANTES ---------- */
.representantes-page { padding: 30px 20px; }
.reps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}
.rep-card {
  background: #fff; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,.1);
  overflow: hidden; display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px; text-align: center; transition: transform .2s, box-shadow .2s;
}
.rep-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.rep-photo { margin-bottom: 16px; }
.rep-photo img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--green); }
.rep-photo-placeholder {
  width: 110px; height: 110px; border-radius: 50%; background: var(--green-bg); border: 4px solid var(--green);
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--green);
}
.rep-info h3 { font-size: 1.1rem; color: var(--text-dark); margin: 0 0 8px; }
.rep-phone { color: var(--text-gray); font-size: .9rem; margin: 0 0 14px; }
.rep-phone i { color: var(--green); }
@media (max-width: 768px) {
  .reps-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .rep-photo img, .rep-photo-placeholder { width: 80px; height: 80px; }
}
@media (max-width: 480px) {
  .reps-grid { grid-template-columns: 1fr; }
}
