/**
 * Bisku Market — Public home (welcome) design system
 */

:root {
  --wm-primary: #2d5a27;
  --wm-primary-light: #4a8b3f;
  --wm-primary-dark: #1a3d16;
  --wm-accent: #a4c639;
  --wm-accent-hot: #f53003;
  --wm-bg: #fdfdfc;
  --wm-bg-soft: #f0f5ee;
  --wm-bg-mint: #e9f2e6;
  --wm-surface: #ffffff;
  --wm-text: #1a1a1a;
  --wm-text-muted: #5c6560;
  --wm-text-subtle: #8a948e;
  --wm-border: rgba(26, 29, 26, 0.08);
  --wm-shadow-sm: 0 2px 12px rgba(16, 24, 20, 0.06);
  --wm-shadow-md: 0 12px 32px rgba(16, 24, 20, 0.1);
  --wm-shadow-lg: 0 24px 48px rgba(16, 24, 20, 0.12);
  --wm-radius: 1rem;
  --wm-radius-lg: 1.5rem;
  --wm-radius-xl: 2rem;
  --wm-font-body: 'Inter', system-ui, sans-serif;
  --wm-font-display: 'Outfit', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.wm-body {
  margin: 0;
  font-family: var(--wm-font-body);
  background: var(--wm-bg);
  color: var(--wm-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.wm-display { font-family: var(--wm-font-display); }

/* Nav */
.wm-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(253, 253, 252, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--wm-border);
}

.wm-nav__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--wm-primary);
  font-family: var(--wm-font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.wm-brand__mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: var(--wm-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.wm-nav__links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.wm-nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wm-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.wm-nav__links a:hover { color: var(--wm-primary); }

.wm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.wm-btn--primary {
  background: var(--wm-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 90, 39, 0.28);
}

.wm-btn--primary:hover {
  background: var(--wm-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45, 90, 39, 0.35);
  color: #fff;
}

.wm-btn--outline {
  background: transparent;
  color: var(--wm-primary);
  border: 1px solid rgba(45, 90, 39, 0.25);
}

.wm-btn--outline:hover {
  background: rgba(45, 90, 39, 0.06);
  color: var(--wm-primary);
}

.wm-btn--ghost-light {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}

.wm-btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Hero */
.wm-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.wm-hero__bg {
  position: absolute;
  inset: 0;
}

.wm-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wm-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.1) 100%);
}

.wm-hero__content {
  position: relative;
  z-index: 2;
  max-width: 80rem;
  margin: 0 auto;
  padding: 6.5rem 1.25rem 4rem;
  width: 100%;
}

.wm-hero__badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.wm-hero__title {
  font-family: var(--wm-font-display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.wm-hero__title em {
  font-style: normal;
  color: var(--wm-accent);
}

.wm-hero__desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.82);
  line-height: 1.65;
  max-width: 32rem;
  margin: 0 0 2rem;
}

.wm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.wm-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 36rem;
}

.wm-hero__stat {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
}

.wm-hero__stat strong {
  display: block;
  font-family: var(--wm-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.wm-hero__stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.wm-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  transform: rotate(180deg);
}

.wm-wave svg {
  width: calc(100% + 2px);
  height: 70px;
  display: block;
}

.wm-wave path { fill: var(--wm-bg); }

/* Sections */
.wm-section {
  padding: 4.5rem 0;
}

.wm-section--soft { background: var(--wm-bg-mint); }

.wm-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wm-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.wm-section__title {
  font-family: var(--wm-font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.wm-section__subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--wm-text-muted);
  max-width: 32rem;
  line-height: 1.55;
}

.wm-section__count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wm-primary);
  background: rgba(45, 90, 39, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

/* Category cards */
.wm-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
}

.wm-cat {
  display: flex;
  flex-direction: column;
  border-radius: var(--wm-radius-xl);
  overflow: hidden;
  background: var(--wm-surface);
  border: 1px solid var(--wm-border);
  box-shadow: var(--wm-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wm-cat:hover {
  transform: translateY(-6px);
  box-shadow: var(--wm-shadow-md);
  color: inherit;
}

.wm-cat__visual {
  position: relative;
  height: 11rem;
  background: var(--cat-bg, var(--wm-primary));
  overflow: hidden;
}

.wm-cat__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.wm-cat:hover .wm-cat__visual img { transform: scale(1.06); }

.wm-cat__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.55) 100%);
}

.wm-cat__initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--wm-font-display);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
}

.wm-cat__count-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: var(--wm-primary-dark);
  font-size: 0.7rem;
  font-weight: 700;
}

.wm-cat__body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.wm-cat__name {
  margin: 0 0 0.5rem;
  font-family: var(--wm-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--wm-text);
}

.wm-cat__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--wm-text-muted);
}

.wm-cat__subs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.wm-cat__sub-pill {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--wm-bg-soft);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--wm-text-muted);
}

/* Product cards */
.wm-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 1rem;
}

.wm-product {
  display: flex;
  flex-direction: column;
  border-radius: var(--wm-radius-lg);
  overflow: hidden;
  background: var(--wm-surface);
  border: 1px solid var(--wm-border);
  box-shadow: var(--wm-shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wm-product:hover {
  transform: translateY(-4px);
  box-shadow: var(--wm-shadow-md);
}

.wm-product__img {
  position: relative;
  aspect-ratio: 1;
  background: var(--wm-bg-soft);
  overflow: hidden;
}

.wm-product__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wm-product__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wm-text-subtle);
  font-size: 2rem;
}

.wm-product__tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wm-product__tag--best {
  background: var(--wm-accent);
  color: var(--wm-primary-dark);
}

.wm-product__tag--deal {
  background: var(--wm-accent-hot);
  color: #fff;
}

.wm-product__body {
  padding: 0.85rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wm-product__cat {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wm-primary);
  margin-bottom: 0.25rem;
}

.wm-product__name {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wm-product__price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.wm-product__price strong {
  font-family: var(--wm-font-display);
  font-size: 1rem;
  color: var(--wm-primary-dark);
}

.wm-product__price del {
  font-size: 0.78rem;
  color: var(--wm-text-subtle);
}

/* Banners strip */
.wm-banners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.wm-banner {
  position: relative;
  border-radius: var(--wm-radius-lg);
  overflow: hidden;
  aspect-ratio: 16/7;
  box-shadow: var(--wm-shadow-sm);
}

.wm-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wm-banner__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-family: var(--wm-font-display);
  font-weight: 600;
  font-size: 1rem;
}

/* Features */
.wm-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.wm-feature {
  padding: 2rem 1.5rem;
  border-radius: var(--wm-radius-lg);
  background: var(--wm-surface);
  border: 1px solid var(--wm-border);
  text-align: center;
  box-shadow: var(--wm-shadow-sm);
}

.wm-feature__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 1rem;
  background: rgba(45, 90, 39, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wm-primary);
}

.wm-feature__icon svg { width: 1.5rem; height: 1.5rem; }

.wm-feature h3 {
  font-family: var(--wm-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.wm-feature p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--wm-text-muted);
  line-height: 1.6;
}

/* Empty state */
.wm-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: var(--wm-radius-lg);
  background: var(--wm-bg-soft);
  border: 1px dashed rgba(45, 90, 39, 0.2);
}

.wm-empty p {
  margin: 0;
  color: var(--wm-text-muted);
  font-size: 0.95rem;
}

/* Footer */
.wm-footer {
  background: #1a1a1a;
  color: #fff;
  padding: 4rem 0 2rem;
}

.wm-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.wm-footer__brand p {
  color: #9ca3af;
  line-height: 1.65;
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.wm-footer h4 {
  font-family: var(--wm-font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
}

.wm-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wm-footer li { margin-bottom: 0.65rem; }

.wm-footer a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}

.wm-footer a:hover { color: #fff; }

.wm-footer__bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Responsive */
@media (min-width: 768px) {
  .wm-nav__links { display: flex; }
}

@media (max-width: 1023px) {
  .wm-hero__stats { grid-template-columns: repeat(2, 1fr); }
  .wm-features { grid-template-columns: 1fr; }
  .wm-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 639px) {
  .wm-hero__stats { grid-template-columns: repeat(2, 1fr); }
  .wm-categories { grid-template-columns: 1fr 1fr; }
  .wm-products { grid-template-columns: repeat(2, 1fr); }
  .wm-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .wm-categories { grid-template-columns: 1fr; }
}

@media (min-width: 640px) and (max-width: 1023px) and (orientation: landscape) {
  .wm-hero { min-height: auto; padding-bottom: 2rem; }
  .wm-hero__content { padding-top: 5.5rem; }
  .wm-categories { grid-template-columns: repeat(3, 1fr); }
  .wm-products { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) and (orientation: landscape) {
  .wm-hero__content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 2rem;
  }

  .wm-hero__stats { max-width: none; }
}

/* Reveal animation */
.wm-reveal {
  animation: wmReveal 0.8s ease-out forwards;
  opacity: 0;
}

@keyframes wmReveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
