/* ===== SERGIPE PLANTAS — ESTILOS GLOBAIS ===== */
:root {
  --verde:      #1a6b2f;
  --verde-dark: #145224;
  --verde-light:#e8f5e0;
  --amarelo:    #f0a500;
  --cinza:      #f5f5f3;
  --borda:      #dde8d8;
  --texto:      #1a2e1a;
  --muted:      #6b7c6b;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(26,107,47,.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--cinza);
  color: var(--texto);
  line-height: 1.6;
}

a { color: var(--verde); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── HEADER ── */
.site-header {
  background: var(--verde);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.site-header .logo img { height: 52px; }
.site-header nav a {
  color: #c8f0d4;
  font-size: 14px;
  margin-left: 20px;
  font-weight: 500;
  transition: color .2s;
}
.site-header nav a:hover, .site-header nav a.active { color: #fff; text-decoration: none; }
.cart-link {
  background: var(--amarelo);
  color: #fff !important;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px !important;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--verde-dark) 0%, var(--verde) 100%);
  color: #fff;
  text-align: center;
  padding: 60px 20px 50px;
}
.hero h1 { font-size: 32px; font-weight: 700; margin-bottom: 10px; }
.hero p  { font-size: 16px; color: #c8f0d4; max-width: 520px; margin: 0 auto 24px; }
.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary   { background: var(--amarelo); color: #fff; }
.btn-primary:hover { background: #d4920a; color: #fff; text-decoration: none; }
.btn-verde     { background: var(--verde); color: #fff; }
.btn-verde:hover { background: var(--verde-dark); }
.btn-outline   { background: transparent; color: var(--verde); border: 1.5px solid var(--verde); }
.btn-outline:hover { background: var(--verde); color: #fff; }
.btn-sm        { padding: 7px 16px; font-size: 13px; }
.btn-block     { display: block; width: 100%; text-align: center; }

/* ── CONTAINER ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── BUSCA / FILTROS ── */
.search-bar {
  background: #fff;
  border-bottom: 1px solid var(--borda);
  padding: 14px 0;
  position: sticky;
  top: 70px;
  z-index: 40;
}
.search-bar .inner {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.search-bar input,
.search-bar select {
  padding: 9px 14px;
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
  color: var(--texto);
}
.search-bar input { flex: 1; min-width: 200px; }

/* ── GRID DE PLANTAS ── */
.plants-section { padding: 30px 0 60px; }
.plants-section h2 { font-size: 20px; font-weight: 600; margin-bottom: 20px; color: var(--verde-dark); }
.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.plant-card {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.plant-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.plant-card .img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--verde-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.plant-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.plant-card .img-wrap .no-img {
  width: 80px; height: 80px; opacity: .35;
}
.plant-card .cat-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--verde); color: #fff;
  font-size: 10px; padding: 3px 9px;
  border-radius: 12px; font-weight: 600;
}
.plant-card .card-body { padding: 12px 14px 14px; }
.plant-card .nome      { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.plant-card .sci       { font-size: 11px; color: var(--muted); font-style: italic; margin-bottom: 6px; }
.plant-card .code      { font-size: 10px; color: #aaa; margin-bottom: 8px; }
.plant-card .sizes     { display: flex; gap: 4px; flex-wrap: wrap; }
.size-tag {
  font-size: 11px; padding: 2px 8px;
  background: var(--verde-light);
  color: var(--verde-dark);
  border-radius: 8px; font-weight: 500;
}
.plant-card .btn-ver {
  display: block; width: 100%; margin-top: 10px;
  padding: 8px; background: var(--verde); color: #fff;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
.plant-card .btn-ver:hover { background: var(--verde-dark); }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 200;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 { font-size: 17px; color: var(--verde-dark); }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--muted); line-height: 1;
}
.modal-body { padding: 20px; }
.modal-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--verde-light);
  border-radius: 12px;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.modal-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 12px;
  padding: 8px;
}
.info-box {
  background: #fffbea;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 14px;
}
.qty-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.qty-table th {
  font-size: 12px; color: var(--muted); font-weight: 500;
  padding: 6px 8px; text-align: left;
  border-bottom: 1px solid var(--borda);
}
.qty-table td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; }
.qty-table td:first-child { font-weight: 700; font-size: 15px; color: var(--verde-dark); }
.qty-input {
  width: 90px; padding: 7px 10px;
  border: 1px solid var(--borda);
  border-radius: 8px; font-size: 14px; text-align: center;
}
.qty-input:focus { outline: none; border-color: var(--verde); }

/* ── CART FLOAT ── */
.cart-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  background: var(--amarelo); color: #fff;
  padding: 13px 22px; border-radius: 30px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  cursor: pointer; display: none;
  text-decoration: none;
}
.cart-float:hover { background: #d4920a; color: #fff; text-decoration: none; }

/* ── PEDIDO PAGE ── */
.page-wrap { padding: 30px 0 60px; }
.page-wrap h1 { font-size: 24px; font-weight: 700; color: var(--verde-dark); margin-bottom: 6px; }
.page-wrap .sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
@media(max-width:800px){ .two-col { grid-template-columns: 1fr; } }

.card-box {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.card-box h3 { font-size: 15px; font-weight: 700; color: var(--verde-dark); margin-bottom: 14px; }

/* itens do cart */
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid #f0f0f0;
}
.cart-item:last-child { border-bottom: none; }
.cart-item .thumb {
  width: 52px; height: 52px; border-radius: 8px;
  background: var(--verde-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .info { flex: 1; }
.cart-item .info strong { font-size: 14px; display: block; }
.cart-item .info span   { font-size: 12px; color: var(--muted); }
.cart-item .remove {
  background: none; border: none; cursor: pointer;
  color: #c0392b; font-size: 20px; line-height: 1;
}

/* formulário */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--borda);
  border-radius: 8px; font-size: 14px;
  background: #fff; color: var(--texto);
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--verde); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.radio-opt { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }

/* ── ADMIN ── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 70px);
}
.admin-sidebar {
  background: var(--verde-dark);
  padding: 20px 0;
}
.admin-sidebar .logo-wrap { padding: 0 18px 20px; border-bottom: 1px solid rgba(255,255,255,.15); }
.admin-sidebar .logo-wrap img { height: 44px; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  color: #c8f0d4; font-size: 14px;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.admin-sidebar nav a .icon { font-size: 18px; }
.admin-main { padding: 28px; background: var(--cinza); }
.admin-main h1 { font-size: 22px; font-weight: 700; color: var(--verde-dark); margin-bottom: 4px; }
.admin-main .breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 24px; }

/* stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.stat-card {
  background: #fff; border: 1px solid var(--borda);
  border-radius: var(--radius); padding: 18px;
  text-align: center;
}
.stat-card .val { font-size: 28px; font-weight: 700; color: var(--verde); }
.stat-card .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* tabelas admin */
.table-wrap {
  background: #fff; border: 1px solid var(--borda);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 20px;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  padding: 11px 14px; text-align: left;
  font-size: 11px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  background: var(--cinza); border-bottom: 1px solid var(--borda);
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f5f5f0;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafaf8; }

/* badges */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 12px; font-size: 11px; font-weight: 600;
}
.badge-novo    { background: #dcfce7; color: #166534; }
.badge-cotado  { background: #fef9c3; color: #854d0e; }
.badge-enviado { background: #dbeafe; color: #1e40af; }
.badge-conc    { background: #f3f4f6; color: #374151; }

/* forms admin */
.admin-form .form-group { margin-bottom: 16px; }
.alert-success {
  background: #dcfce7; border: 1px solid #86efac;
  color: #166534; padding: 12px 16px;
  border-radius: 8px; font-size: 14px; margin-bottom: 16px;
}
.alert-error {
  background: #fee2e2; border: 1px solid #fca5a5;
  color: #991b1b; padding: 12px 16px;
  border-radius: 8px; font-size: 14px; margin-bottom: 16px;
}

/* ── RESPONSIVE ── */
@media(max-width: 768px) {
  .hero h1 { font-size: 24px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .site-header nav .hide-sm { display: none; }
  .plant-grid { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); }
}

/* ── FOOTER ── */
.site-footer {
  background: var(--verde-dark); color: #c8f0d4;
  text-align: center; padding: 28px 20px;
  font-size: 13px; margin-top: 40px;
}
.site-footer a { color: #a8e6b8; }
