/* Soko Africa — component styles (use with Tailwind CDN) */
body {
  min-height: 100vh;
  color: #27272a;
  -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(165deg, #e8f3ec 0%, #f0f7f3 35%, #f6fbf8 70%, #faf5ee 100%);
  background-attachment: fixed;
}
.ui-card {
  border-radius: 1rem;
  border: 1px solid rgba(179, 225, 200, 0.5);
  background: #f6fbf8;
  box-shadow: 0 1px 2px rgba(18, 64, 39, 0.06), 0 4px 20px rgba(18, 64, 39, 0.05);
}
.ui-panel {
  border-radius: 1rem;
  border: 1px solid rgba(179, 225, 200, 0.4);
  background: rgba(220, 238, 228, 0.6);
}
.ui-input {
  border-radius: 0.75rem;
  border: 1px solid rgba(179, 225, 200, 0.7);
  background: #fcfefd;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  width: 100%;
}
.ui-input:focus {
  outline: none;
  border-color: #45a872;
  box-shadow: 0 0 0 2px rgba(179, 225, 200, 0.8);
}
.bg-hero-gradient {
  background: linear-gradient(135deg, #124027 0%, #1a6239 45%, #1f7a47 100%);
}
.bg-accent-gradient {
  background: linear-gradient(135deg, #f5821a 0%, #e6650c 100%);
}
.bg-footer-wash {
  background: linear-gradient(180deg, #dceee4 0%, #e8f3ec 50%, #d9f0e3 100%);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem; }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; }
}
.product-prose { font-size: 0.875rem; line-height: 1.625; color: #3f3f46; word-break: break-word; }
.product-prose img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 0.75rem 0; }
.gallery-thumb { cursor: pointer; }
#gallery-main { transition: opacity 0.15s ease; }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aspect-square { aspect-ratio: 1 / 1; }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }

/* Logo preloader */
.soko-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #e8f3ec 0%, #f0f7f3 50%, #f6fbf8 100%);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.soko-preloader--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.soko-preloader__card {
  text-align: center;
  padding: 2rem;
}
.soko-preloader__logo {
  width: min(14rem, 70vw);
  height: auto;
  object-fit: contain;
  animation: soko-logo-pulse 1.2s ease-in-out infinite;
}
.soko-preloader__ring {
  width: 2.5rem;
  height: 2.5rem;
  margin: 1.25rem auto 0;
  border: 3px solid rgba(31, 122, 71, 0.2);
  border-top-color: #1f7a47;
  border-radius: 50%;
  animation: soko-spin 0.75s linear infinite;
}
.soko-preloader__text {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a6239;
}
@keyframes soko-spin {
  to { transform: rotate(360deg); }
}
@keyframes soko-logo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

/* PWA install — small bottom toast only (no overlay / no fullscreen) */
.soko-pwa-toast {
  position: fixed;
  z-index: 10050;
  left: 0.5rem;
  right: 0.5rem;
  bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  width: auto;
  height: auto;
  max-width: 20rem;
  margin: 0 auto;
  pointer-events: none;
}
.soko-pwa-toast--hidden {
  display: none !important;
}
.soko-pwa-toast__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.35rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(179, 225, 200, 0.9);
  background: #fff;
  box-shadow: 0 2px 10px rgba(18, 64, 39, 0.12);
}
.soko-pwa-toast__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  border-radius: 0.25rem;
}
.soko-pwa-toast__title {
  flex: 1;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #124027;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.soko-pwa-toast__action {
  flex-shrink: 0;
  border: none;
  border-radius: 0.35rem;
  padding: 0.22rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: #1f7a47;
  cursor: pointer;
}
.soko-pwa-toast__action:active {
  background: #1a6239;
}
.soko-pwa-toast__close {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #71717a;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}
.soko-pwa-toast__hint {
  pointer-events: none;
  margin: 0.2rem 0 0;
  padding: 0.28rem 0.4rem;
  font-size: 0.6rem;
  line-height: 1.3;
  color: #1a6239;
  background: #fff;
  border-radius: 0.4rem;
  border: 1px solid rgba(179, 225, 200, 0.75);
  box-shadow: 0 2px 8px rgba(18, 64, 39, 0.08);
}
.soko-pwa-toast__hint--hidden {
  display: none !important;
}
@media (min-width: 768px) {
  .soko-pwa-toast {
    left: auto;
    right: 0.75rem;
    bottom: 0.75rem;
    margin: 0;
  }
}
