/* ═══════════════════════════════════════════════════════════
   SAFO World-Class Refresh
   Safe progressive enhancement layer for marketplace + admin
   ═══════════════════════════════════════════════════════════ */

:root {
  --wc-surface: #ffffff;
  --wc-surface-soft: #f8fafc;
  --wc-surface-muted: #f1f5f9;
  --wc-border: rgba(15, 23, 42, 0.08);
  --wc-border-strong: rgba(15, 23, 42, 0.14);
  --wc-text: #065F46;
  --wc-text-soft: #475569;
  --wc-text-muted: #64748b;
  --wc-green: #0f9f5c;
  --wc-green-dark: #0a7b46;
  --wc-green-soft: rgba(15, 159, 92, 0.08);
  --wc-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --wc-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --wc-shadow-md: 0 16px 36px rgba(15, 23, 42, 0.12);
  --wc-shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.18);
  --wc-radius-sm: 10px;
  --wc-radius-md: 16px;
  --wc-radius-lg: 22px;
  --wc-radius-xl: 28px;
}

body {
  text-rendering: optimizeLegibility;
}

.home-premium-shell {
  background:
    radial-gradient(circle at top right, rgba(15, 159, 92, 0.10), transparent 22%),
    linear-gradient(180deg, #f8fbf9 0%, #f8fafc 16%, #f8fafc 100%);
}

/* ── Premium marketplace shell refinements ─────────────── */
.premium-header {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid var(--wc-border) !important;
  box-shadow: var(--wc-shadow-xs) !important;
}

.premium-header .safo-header-inner {
  padding-inline: 14px !important;
}

.premium-header .safo-header-logo {
  border-radius: 12px !important;
  box-shadow: 0 8px 18px rgba(15, 159, 92, 0.16);
}

.premium-header .safo-header-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96)) !important;
  border: 1px solid var(--wc-border) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05) !important;
}

.premium-header .safo-header-btn:hover,
.premium-header .safo-header-btn:active {
  color: var(--wc-green-dark) !important;
  border-color: rgba(15, 159, 92, 0.18) !important;
  background: #fff !important;
}

.search-experience-card.sticky-search {
  background: rgba(255,255,255,0.94) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--wc-border) !important;
}

.smart-search-premium {
  min-height: 50px;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.20) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 10px 22px rgba(15, 23, 42, 0.05);
}

.smart-search-premium:focus-within {
  border-color: rgba(15, 159, 92, 0.34) !important;
  box-shadow: 0 0 0 4px rgba(15, 159, 92, 0.10), 0 14px 28px rgba(15, 23, 42, 0.08) !important;
}

.smart-search-premium .search-btn-orange {
  background: linear-gradient(135deg, var(--wc-green), #16a34a) !important;
  color: #fff !important;
  box-shadow: 0 10px 18px rgba(15, 159, 92, 0.26) !important;
}

.search-chip-groups {
  gap: 12px !important;
  padding-bottom: 2px;
}

.search-chip {
  background: #fff !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.trend-chip {
  background: rgba(15, 159, 92, 0.08) !important;
  border-color: rgba(15, 159, 92, 0.16) !important;
}

.premium-top-tabs {
  gap: 8px !important;
  padding: 10px 14px 2px !important;
}

.premium-top-tabs .top-tab {
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: rgba(255,255,255,0.82) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.premium-top-tabs .top-tab.active {
  background: linear-gradient(135deg, var(--wc-green), #16a34a) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(15, 159, 92, 0.22) !important;
}

.home-hero-panel {
  padding: 12px 14px 0 !important;
}

.hero-slider-container-premium {
  height: 238px !important;
  border-radius: 26px !important;
  overflow: hidden !important;
  box-shadow: var(--wc-shadow-md) !important;
}

.hero-slider-container-premium .hero-slider-track,
.hero-slider-container-premium .hero-slide {
  height: 238px !important;
}

.hero-slide::after {
  background: linear-gradient(180deg, rgba(10, 24, 39, 0.08) 0%, rgba(10, 24, 39, 0.26) 56%, rgba(10, 24, 39, 0.74) 100%) !important;
  border-radius: 26px !important;
}

.hero-premium-overlay {
  padding: 18px 18px 20px !important;
}

.hero-story-card {
  max-width: min(100%, 420px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 5px 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-premium-title {
  font-size: clamp(18px, 3.8vw, 22px) !important;
  line-height: 1.22 !important;
  max-width: 82% !important;
}

.hero-premium-text {
  font-size: 12px !important;
  color: rgba(255,255,255,0.88) !important;
  max-width: 88%;
}

.hero-cta-btn.hero-cta-primary {
  border-radius: 16px !important;
  background: linear-gradient(135deg, var(--wc-green), #22c55e) !important;
  box-shadow: 0 16px 30px rgba(15, 159, 92, 0.28) !important;
}

.hero-slider-container-premium .hero-slider-dot.active {
  width: 24px !important;
  background: #fff !important;
}

.hero-slider-container-premium .hero-slider-arrow {
  background: rgba(255,255,255,0.96) !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18) !important;
}

.home-promo-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.home-promo-card {
  min-height: 88px;
  border-radius: 20px !important;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(145deg, #ffffff 0%, #f8fbf9 100%) !important;
  box-shadow: var(--wc-shadow-sm);
}

.home-promo-card--soft {
  background: linear-gradient(145deg, #f8fffb 0%, #eefbf3 100%) !important;
}

.home-promo-card strong {
  font-size: 14px;
  color: var(--wc-text);
}

.home-promo-card span {
  color: var(--wc-text-muted) !important;
}

.home-promo-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(15, 159, 92, 0.10);
  color: var(--wc-green-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.premium-quick-actions {
  gap: 10px !important;
  padding: 0 14px 14px !important;
}

.quick-action-card {
  border-radius: 22px !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  background: rgba(255,255,255,0.88) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
}

.quick-action-card .qa-icon {
  background: linear-gradient(135deg, rgba(15,159,92,0.12), rgba(37,99,235,0.09));
  color: var(--wc-green-dark);
}

.premium-section,
.ui2-suppliers {
  margin-inline: 14px;
}

.premium-section .section-header-inline,
.ui2-suppliers__header {
  margin-bottom: 10px;
}

.section-header-inline h3,
.ui2-suppliers__title {
  letter-spacing: -0.01em;
}

.section-header-inline .view-all,
.ui2-suppliers__link {
  color: var(--wc-green-dark) !important;
}

.pro-categories-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.pro-cat-card {
  border-radius: 20px !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05) !important;
}

.pro-cat-card:hover,
.quick-action-card:hover,
.home-promo-card:hover {
  transform: translateY(-2px);
}

.premium-products-grid,
.premium-deals-grid {
  gap: 12px !important;
}

.premium-products-grid .product-card,
.premium-deals-grid .deal-card,
.premium-deals-grid .product-card {
  border-radius: 20px !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  overflow: hidden;
}

.bottom-nav.ui2-bottom-nav {
  background: rgba(255,255,255,0.96) !important;
  border-top: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08) !important;
}

.bottom-nav-item.ui2-nav-item {
  border-radius: 16px !important;
}

.bottom-nav-item.ui2-nav-item.active {
  color: var(--wc-green-dark) !important;
}

.bottom-nav-item.ui2-nav-item.active::after {
  background: linear-gradient(135deg, var(--wc-green), #22c55e) !important;
}

/* ── Admin experience refinements ─────────────────────── */
.admin-login,
.admin-login-standalone {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(15,159,92,0.20), transparent 22%),
    radial-gradient(circle at bottom left, rgba(37,99,235,0.16), transparent 20%),
    linear-gradient(135deg, #07111f 0%, #111111 48%, #1a1a1a 100%);
}

.admin-login-card {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.10) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: 0 30px 80px rgba(0,0,0,0.32) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.admin-login-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #22c55e 0%, #38bdf8 50%, #22c55e 100%);
}

.admin-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-login-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(255,255,255,0.94);
  padding: 12px;
  box-shadow: 0 18px 36px rgba(15,159,92,0.20);
}

.admin-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #d1fae5;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.20);
}

.admin-login-card h2 {
  margin-top: 8px !important;
  margin-bottom: 6px !important;
}

.admin-login-subtitle {
  color: #cbd5e1 !important;
  line-height: 1.7;
  margin-bottom: 24px !important;
}

.admin-login-card .form-group {
  margin-bottom: 14px;
}

.admin-login-card .form-label {
  color: #e2e8f0 !important;
  margin-bottom: 8px;
  display: block;
  font-weight: 600;
}

.admin-login-card .form-input {
  min-height: 52px;
  background: rgba(255,255,255,0.10) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.admin-login-card .form-input::placeholder {
  color: rgba(203,213,225,0.62) !important;
}

.admin-login-card .btn-primary {
  margin-top: 12px !important;
  background: linear-gradient(135deg, var(--wc-green), #22c55e) !important;
  box-shadow: 0 18px 34px rgba(15,159,92,0.26) !important;
}

.admin-login-meta {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-login-meta-card {
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 12px;
  text-align: right;
}

.admin-login-meta-card strong {
  display: block;
  color: #fff;
  font-size: 12px;
  margin-bottom: 4px;
}

.admin-login-meta-card span {
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .hero-slider-container-premium,
  .hero-slider-container-premium .hero-slider-track,
  .hero-slider-container-premium .hero-slide {
    height: 216px !important;
  }

  .hero-premium-title {
    max-width: 90% !important;
  }

  .hero-premium-text {
    max-width: 94%;
  }

  .home-promo-strip {
    grid-template-columns: 1fr;
  }

  .admin-login-card {
    padding: 34px 22px !important;
  }

  .admin-login-meta {
    grid-template-columns: 1fr;
  }
}
