/* ============================================================
   SOKOSHAMBA PROFESSIONAL POLISH
   Additional styles for production-ready look
   ============================================================ */

/* --- Professional product cards --- */
.product-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  background: #fff;
}
.product-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.product-card__media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f3f4f6;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-card:hover .product-card__media img {
  transform: scale(1.03);
}
.product-card__body {
  padding: 16px;
}
.product-card__title {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  margin-bottom: 6px;
  color: #1a1a1a;
}
.product-card__title a {
  color: inherit;
  text-decoration: none;
}
.product-card__title a:hover {
  color: #0f5132;
}
.product-card__meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.product-card .price {
  font-size: 18px;
  font-weight: 800;
  color: #0f5132;
  margin: 8px 0;
}
.product-card .price small {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}
.product-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.product-card__actions .btn {
  flex: 1;
  text-align: center;
}

/* --- Clean badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.01em;
}
.badge--green {
  background: #dcfce7;
  color: #166534;
}
.badge--verified {
  background: #0f5132;
  color: #fff;
  font-size: 10px;
  padding: 3px 8px;
}
.badge--danger {
  background: #fef2f2;
  color: #991b1b;
}
.badge--info {
  background: #eff6ff;
  color: #1e40af;
}
.badge--warn {
  background: #fffbeb;
  color: #92400e;
}
.badge--light {
  background: #f3f4f6;
  color: #374151;
}

/* --- Clean buttons --- */
.btn--primary {
  background: #0f5132;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.15s ease;
}
.btn--primary:hover {
  background: #166534;
}
.btn--outline {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  background: #fff;
}
.btn--outline:hover {
  border-color: #0f5132;
  color: #0f5132;
}

/* --- Professional forms --- */
.input, .select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus {
  border-color: #0f5132;
  box-shadow: 0 0 0 3px rgba(15,81,50,0.1);
  outline: none;
}

/* --- Cards --- */
.card {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.card--pad {
  padding: 20px;
}
.card__head {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 12px 12px 0 0;
}
.card__body {
  padding: 20px;
}

/* --- Stats --- */
.stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}
.stat__label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 4px;
}
.stat__value {
  font-size: 24px;
  font-weight: 800;
  color: #0f5132;
}
.stat__meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

/* --- Tables --- */
.data {
  width: 100%;
  border-collapse: collapse;
}
.data th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  padding: 10px 12px;
  border-bottom: 2px solid #e5e7eb;
  text-align: left;
}
.data td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  vertical-align: middle;
}
.data tr:hover td {
  background: #f9fafb;
}

/* --- Alerts --- */
.alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  align-items: flex-start;
}
.alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.alert--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.alert--warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tab.active, .tab:hover {
  background: #0f5132;
  color: #fff;
  border-color: #0f5132;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  max-width: 380px;
  animation: slideIn 0.3s ease;
}
.toast--success { border-left: 4px solid #16a34a; }
.toast--error { border-left: 4px solid #dc2626; }
.toast--warn { border-left: 4px solid #d97706; }
.toast--info { border-left: 4px solid #2563eb; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- Spinner --- */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #0f5132;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Auth pages --- */
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
  gap: 0;
}
.auth-visual {
  background: linear-gradient(135deg, #0f5132, #166534);
  color: #fff;
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-visual h2 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}
.auth-visual p {
  color: #d1fae5;
  font-size: 15px;
  line-height: 1.6;
}
.auth-visual ul {
  list-style: none;
  padding: 0;
  margin-top: 24px;
}
.auth-visual li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #d1fae5;
  font-size: 14px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
}
.auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

/* --- Mobile responsive polish --- */
@media (max-width: 768px) {
  .auth-wrap {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    display: none;
  }
  .auth-panel {
    padding: 24px 16px;
  }
  .product-card__media {
    aspect-ratio: 3/2;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card__body {
    padding: 12px;
  }
  .product-card .price {
    font-size: 15px;
  }
  .product-card__title {
    font-size: 13px;
  }
  .product-card__actions {
    flex-direction: column;
    gap: 6px;
  }
  .stat__value {
    font-size: 20px;
  }
  .tabs {
    gap: 2px;
  }
  .tab {
    padding: 6px 10px;
    font-size: 11px;
  }
  .card--pad {
    padding: 16px;
  }
  .hero__inner {
    padding: 24px 16px;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .glass-card {
    display: none;
  }
  .market-layout {
    grid-template-columns: 1fr !important;
  }
  .filters {
    display: none;
  }
  .filters.open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-card__actions .btn {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* --- Stepper --- */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.stepper__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
}
.stepper__item.active {
  color: #0f5132;
}
.stepper__item.done {
  color: #16a34a;
}
.stepper__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #d1d5db;
}
.stepper__item.active .stepper__num {
  background: #0f5132;
  color: #fff;
  border-color: #0f5132;
}
.stepper__item.done .stepper__num {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.stepper__sep {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  min-width: 20px;
}

/* --- Dropdown --- */
.dropdown {
  position: relative;
}
.dropdown__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  min-width: 240px;
  overflow: hidden;
}
.menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
}
.menu-item:hover {
  background: #f3f4f6;
  color: #0f5132;
}

/* --- State (loading/empty/error) --- */
.state {
  text-align: center;
  padding: 48px 24px;
}
.state h3 {
  margin: 16px 0 8px;
  font-size: 18px;
}
.state p {
  color: #6b7280;
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
}

/* --- Chips --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}
.chip.active {
  background: #0f5132;
  color: #fff;
  border-color: #0f5132;
}

/* --- Fav button --- */
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #9ca3af;
  transition: all 0.15s ease;
}
.fav-btn:hover, .fav-btn.is-active {
  color: #dc2626;
  background: #fff;
}

/* --- JotForm Chatbot — position left (WhatsApp is on right) --- */
.jf-chatbot-container,
.jf-chatbot-wrapper,
iframe[src*="jotfor.ms"],
div[id*="jf-agent"],
div[class*="jf-agent"],
#agent-embed-container,
.agent-embed-button {
  left: 20px !important;
  right: auto !important;
  bottom: 20px !important;
}

/* Move WhatsApp button to right (keep it there) */
#waFloat {
  right: 20px !important;
  left: auto !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
