/* ============================================================
   KebunBapakku — Components & Layout (components.css)
   ============================================================ */

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--forest-900);
  color: #eafff0;
  font-size: 0.84rem;
}
.announce .container {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-block: 8px;
}
.announce__msg {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.announce__spacer {
  flex: 1;
}
.announce__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cdeedb;
  transition: color var(--transition);
}
.announce__item:hover {
  color: #fff;
}
.announce__item svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 253, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-main {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 14px;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.logo__mark {
  width: 42px;
  height: 42px;
  flex: none;
}
.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--forest-800);
  letter-spacing: -0.02em;
}
.logo__tag {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--green-700);
  font-weight: 600;
  text-transform: uppercase;
}

/* Search */
.search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.search input {
  width: 100%;
  padding: 11px 16px 11px 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search input:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.search__icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  pointer-events: none;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--forest-800);
  transition: background var(--transition), transform var(--transition);
}
.icon-btn:hover {
  background: var(--green-50);
}
.icon-btn svg {
  width: 23px;
  height: 23px;
}
.count-bubble {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: #3a2500;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid var(--cream);
}
.count-bubble.is-zero {
  display: none;
}

.hamburger {
  display: none;
}

/* ---------- Navigation ---------- */
.site-nav {
  border-top: 1px solid var(--border);
  background: rgba(255, 253, 245, 0.6);
}
.nav-list {
  display: flex;
  gap: 4px;
  padding-block: 4px;
  flex-wrap: wrap;
}
.nav-list a {
  display: inline-block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--forest-800);
  background: var(--green-50);
}
.nav-list a.is-promo {
  color: var(--amber-dark);
}

/* Mobile drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 61, 32, 0.4);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition);
}
.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(84vw, 340px);
  background: var(--cream);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform var(--transition);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.open {
  transform: translateX(0);
}
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}
.drawer__nav {
  padding: 10px;
  display: grid;
  gap: 2px;
}
.drawer__nav a {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--gray-700);
}
.drawer__nav a:hover {
  background: var(--green-50);
  color: var(--forest-800);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(
      1200px 600px at 85% -10%,
      rgba(34, 197, 94, 0.16),
      transparent 60%
    ),
    linear-gradient(180deg, var(--green-50), var(--cream));
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 84px);
}
.hero__content {
  display: grid;
  gap: 20px;
  max-width: 560px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.08;
}
.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--gray-600);
  max-width: 48ch;
}
.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero__trust {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--green-700);
  font-weight: 600;
  font-size: 0.95rem;
}
.hero__trust svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin-inline: auto;
  width: 100%;
}
.hero__art svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 24px 48px rgba(16, 60, 32, 0.22));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.hero__blob {
  position: absolute;
  inset: 6% 6% 6% 6%;
  background: radial-gradient(circle at 50% 45%, rgba(74, 222, 128, 0.35), transparent 62%);
  border-radius: 50%;
  z-index: 0;
}

/* ---------- Benefits ---------- */
.benefits-grid {
  grid-template-columns: repeat(4, 1fr);
}
.benefit {
  padding: 28px 22px;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.benefit:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.benefit__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--green-50);
  display: grid;
  place-items: center;
  color: var(--green-700);
}
.benefit__icon svg {
  width: 30px;
  height: 30px;
}
.benefit h3 {
  font-size: 1.1rem;
}
.benefit p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* ---------- Category grid ---------- */
.cat-grid {
  grid-template-columns: repeat(3, 1fr);
}
.cat-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  transition: transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.cat-card svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-card__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 18px 16px;
  background: linear-gradient(transparent, rgba(15, 61, 32, 0.78));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-card__label svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Product grid & cards ---------- */
.product-grid {
  grid-template-columns: repeat(4, 1fr);
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--green-50);
}
.product-card__media svg,
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  color: var(--gray-500);
  box-shadow: var(--shadow-sm);
  transition: color var(--transition), transform var(--transition);
  z-index: 2;
}
.wishlist-btn:hover {
  transform: scale(1.1);
  color: var(--red);
}
.wishlist-btn[aria-pressed="true"] {
  color: var(--red);
}
.wishlist-btn svg {
  width: 20px;
  height: 20px;
}
.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  flex: 1;
}
.product-card__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--charcoal);
}
.product-card__name:hover {
  color: var(--green-700);
}
.product-card__unit {
  font-size: 0.84rem;
  color: var(--text-muted);
}
.product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}
.product-card__price {
  font-size: 1.18rem;
}
.product-card__stock {
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.product-card__stock.ok { color: var(--green-700); }
.product-card__stock.low { color: var(--amber-dark); }
.product-card__stock.out { color: var(--gray-500); }
.product-card__stock .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.product-card__foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  gap: 8px;
}
.product-card__foot .btn {
  flex: 1;
  padding: 11px 14px;
}

/* ---------- Promo banner ---------- */
.promo-banner {
  background: linear-gradient(135deg, var(--forest-800), var(--green-700));
  border-radius: var(--radius-lg);
  color: #fff;
  padding: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.promo-banner h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
}
.promo-banner p {
  color: #d7f5e2;
  max-width: 46ch;
  margin-block: 12px 20px;
}
.promo-banner__art {
  justify-self: end;
}
.promo-banner__art svg {
  width: clamp(160px, 24vw, 260px);
  height: auto;
}

/* ---------- Brand story ---------- */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.story__art svg {
  width: 100%;
  border-radius: var(--radius-lg);
}
.story__content {
  display: grid;
  gap: 16px;
}
.story__content p {
  color: var(--gray-600);
}
.story__points {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}
.story__points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.story__points svg {
  width: 24px;
  height: 24px;
  color: var(--green-500);
  flex: none;
  margin-top: 2px;
}

/* ---------- WhatsApp CTA section ---------- */
.wa-cta {
  background: var(--green-50);
}
.wa-cta__box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  display: grid;
  gap: 16px;
  place-items: center;
  box-shadow: var(--shadow);
}
.wa-cta__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: grid;
  place-items: center;
}
.wa-cta__icon svg {
  width: 40px;
  height: 40px;
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-900);
  color: #cdeedb;
  padding-block: clamp(40px, 6vw, 64px) 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-brand .logo__name {
  color: #fff;
}
.footer-brand .logo__tag {
  color: var(--green-400);
}
.footer-brand p {
  margin-top: 14px;
  font-size: 0.92rem;
  max-width: 34ch;
}
.footer-links {
  display: grid;
  gap: 10px;
}
.footer-links a {
  color: #a8d7bb;
  font-size: 0.92rem;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: #fff;
}
.footer-contact {
  display: grid;
  gap: 12px;
  font-size: 0.92rem;
}
.footer-contact a,
.footer-contact span {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #a8d7bb;
}
.footer-contact a:hover {
  color: #fff;
}
.footer-contact svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--green-400);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 40px;
  padding-block: 20px;
  text-align: center;
  font-size: 0.84rem;
  color: #88b89a;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1300;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  transition: transform var(--transition);
  animation: wa-pulse 2.6s ease-out infinite;
}
.wa-float:hover {
  transform: scale(1.08);
}
.wa-float svg {
  width: 34px;
  height: 34px;
  color: #fff;
}
@keyframes wa-pulse {
  0% { box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45), 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-block: 16px;
}
.breadcrumbs svg {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.6;
}
.breadcrumbs a:hover {
  color: var(--green-700);
}
.breadcrumbs span[aria-current] {
  color: var(--forest-800);
  font-weight: 600;
}

/* ---------- Page banner ---------- */
.page-banner {
  background: linear-gradient(180deg, var(--green-50), var(--cream));
  padding-block: clamp(28px, 4vw, 48px);
  text-align: center;
}
.page-banner h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.page-banner p {
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- Empty / loading / error states ---------- */
.state {
  text-align: center;
  padding: clamp(40px, 8vw, 80px) 20px;
  display: grid;
  gap: 14px;
  place-items: center;
}
.state svg {
  width: 72px;
  height: 72px;
  color: var(--gray-300);
}
.state h3 {
  font-size: 1.3rem;
}
.state p {
  color: var(--text-muted);
  max-width: 44ch;
}
.skeleton {
  background: linear-gradient(90deg, var(--gray-100), var(--gray-200), var(--gray-100));
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.skeleton-card .sk-media {
  aspect-ratio: 1 / 1;
}
.skeleton-card .sk-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}
.skeleton-card .sk-line {
  height: 14px;
}
@keyframes shimmer {
  to { background-position: -200% 0; }
}
