/* ============================================================
   MALU.LK — Ocean theme
   ============================================================ */

:root {
  --deep: #06304e;
  --deeper: #042138;
  --ocean: #0a4d78;
  --teal: #0e94a8;
  --aqua: #7fd6e8;
  --foam: #eaf7fb;
  --sand: #fdf8ef;
  --coral: #ff6b4a;
  --coral-dark: #e5522f;
  --wa: #25d366;
  --wa-dark: #1eb856;
  --ink: #12354f;
  --ink-soft: #5b7488;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(6, 48, 78, 0.10);
  --shadow-lg: 0 16px 48px rgba(6, 48, 78, 0.22);
  --font-head: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--foam);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(4, 33, 56, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
}
.header-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 800; font-size: 1.45rem;
  text-decoration: none; letter-spacing: 0.2px;
}
.logo svg { width: 38px; height: 38px; }
.logo .lk { color: var(--aqua); }
.header-spacer { flex: 1; }
.header-call {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 0.92rem; text-decoration: none;
  color: #d9f1f8; padding: 8px 12px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s;
}
.header-call:hover { background: rgba(255, 255, 255, 0.16); }
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--coral); color: #fff;
  font-weight: 800; font-size: 0.95rem;
  padding: 10px 16px; border-radius: 99px;
  transition: transform 0.15s, background 0.2s;
}
.cart-btn:hover { background: var(--coral-dark); transform: translateY(-1px); }
.cart-btn:active { transform: scale(0.97); }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 22px; height: 22px; padding: 0 5px;
  background: #fff; color: var(--coral-dark);
  border-radius: 99px; font-size: 0.75rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--coral);
  opacity: 0; transform: scale(0.5); transition: all 0.2s;
}
.cart-count.show { opacity: 1; transform: scale(1); }

/* ============ HERO ============ */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(165deg, #04395e 0%, #06304e 35%, #0a5f83 75%, #0e94a8 100%);
  padding: 56px 0 130px;
}
.hero-inner { position: relative; z-index: 3; text-align: center; }
.hero-cry {
  display: inline-block;
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 20px; border-radius: 99px;
  margin-bottom: 20px; letter-spacing: 0.5px;
  animation: bob 3s ease-in-out infinite;
}
.hero h1 {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.12; margin-bottom: 16px;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--aqua); }
.hero p.sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #cfeaf4; max-width: 560px; margin: 0 auto 30px;
  text-wrap: balance;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  padding: 14px 28px; border-radius: 99px; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 8px 24px rgba(255, 107, 74, 0.4); }
.btn-coral:hover { background: var(--coral-dark); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35); }
.btn-wa:hover { background: var(--wa-dark); }

/* swimming fish */
.hero-fish {
  position: absolute; z-index: 1; opacity: 0.35; pointer-events: none;
  animation: swim linear infinite;
}
.hero-fish svg { width: 100%; height: 100%; }
@keyframes swim {
  from { transform: translateX(-140px) }
  to   { transform: translateX(calc(100vw + 140px)) }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) }
  50%      { transform: translateY(-6px) }
}

/* bubbles */
.bubble {
  position: absolute; bottom: -30px; z-index: 1;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.5), rgba(255,255,255,0.06));
  animation: rise linear infinite;
}
@keyframes rise {
  from { transform: translateY(0); opacity: 0.8 }
  to   { transform: translateY(-120vh); opacity: 0 }
}

/* wave divider */
.wave {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2;
  line-height: 0;
}
.wave svg { width: 100%; height: 70px; display: block; }

/* ============ TRUST STRIP ============ */
.trust {
  position: relative; z-index: 4;
  margin-top: -46px; margin-bottom: 34px;
}
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 20px 18px;
}
.trust-item { display: flex; align-items: center; gap: 11px; min-width: 0; }
.trust-item .t-emoji {
  font-size: 1.6rem; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--foam);
}
.trust-item b { display: block; font-size: 0.92rem; font-weight: 800; }
.trust-item span { font-size: 0.8rem; color: var(--ink-soft); }

/* ============ CATALOG CONTROLS ============ */
.catalog-head { text-align: center; margin: 10px 0 20px; }
.section-title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--deep);
}
.section-sub { color: var(--ink-soft); margin-top: 6px; font-size: 1rem; }

.controls {
  position: sticky; top: 62px; z-index: 50;
  background: linear-gradient(var(--foam) 82%, rgba(234, 247, 251, 0));
  padding: 10px 0 14px;
}
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; stroke: var(--ink-soft);
}
#search {
  width: 100%; padding: 14px 18px 14px 46px;
  border: 2px solid transparent; border-radius: 99px;
  background: #fff; box-shadow: var(--shadow);
  font-family: inherit; font-size: 1rem; color: var(--ink);
  outline: none; transition: border-color 0.2s;
}
#search:focus { border-color: var(--teal); }
#search::placeholder { color: #9db4c4; }

.chips {
  display: flex; gap: 9px; overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: flex; align-items: center; gap: 7px;
  padding: 9px 17px; border-radius: 99px;
  background: #fff; box-shadow: var(--shadow);
  font-weight: 700; font-size: 0.9rem; color: var(--ink);
  border: 2px solid transparent;
  transition: all 0.18s; white-space: nowrap;
}
.chip:hover { border-color: var(--aqua); }
.chip.active {
  background: var(--deep); color: #fff; border-color: var(--deep);
}

/* ============ PRODUCT GRID ============ */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  padding-bottom: 30px;
}
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: cardIn 0.35s ease both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) }
  to   { opacity: 1; transform: translateY(0) }
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-art {
  position: relative; aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-art svg { width: 58%; height: 74%; filter: drop-shadow(0 6px 10px rgba(6,48,78,0.18)); }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.3px;
  padding: 5px 11px; border-radius: 99px;
  background: var(--coral); color: #fff;
  box-shadow: 0 3px 10px rgba(229, 82, 47, 0.45);
}
.card.sold .card-art svg, .card.sold .card-art img { filter: grayscale(1); opacity: 0.45; }
.sold-ribbon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.sold-ribbon span {
  background: rgba(4, 33, 56, 0.82); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  padding: 8px 22px; border-radius: 99px; transform: rotate(-6deg);
}

.card-body { padding: 15px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-name {
  font-family: var(--font-head); font-weight: 700;
  font-size: 1.06rem; line-height: 1.25; color: var(--deep);
}
.card-local { font-size: 0.86rem; color: var(--teal); font-weight: 700; margin-top: 1px; }
.card-desc {
  font-size: 0.86rem; color: var(--ink-soft); margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  margin-top: auto; padding-top: 13px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
}
.price { line-height: 1.05; }
.price b { font-family: var(--font-head); font-size: 1.22rem; font-weight: 800; color: var(--coral-dark); }
.price small { display: block; font-size: 0.76rem; color: var(--ink-soft); font-weight: 700; margin-top: 2px; }

.add-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--deep); color: #fff;
  font-weight: 800; font-size: 0.9rem;
  padding: 10px 17px; border-radius: 99px;
  transition: background 0.2s, transform 0.15s;
}
.add-btn:hover { background: var(--ocean); }
.add-btn:active { transform: scale(0.94); }
.add-btn[disabled] { background: #c3d2dc; cursor: not-allowed; }

.stepper {
  display: flex; align-items: center; gap: 2px;
  background: var(--deep); border-radius: 99px; padding: 4px;
}
.stepper button {
  width: 32px; height: 32px; border-radius: 50%;
  color: #fff; font-size: 1.15rem; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.stepper button:hover { background: rgba(255, 255, 255, 0.15); }
.stepper .qty {
  min-width: 28px; text-align: center;
  color: #fff; font-weight: 800; font-size: 0.98rem;
}

.empty-msg {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 20px; color: var(--ink-soft);
}
.empty-msg .big { font-size: 3rem; margin-bottom: 10px; }

/* ============ HOW IT WORKS ============ */
.how { background: var(--deep); color: #fff; position: relative; padding: 70px 0 80px; margin-top: 30px; }
.how .section-title { color: #fff; text-align: center; }
.how .section-sub { color: #a8cfe0; text-align: center; margin-bottom: 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius); padding: 28px 22px; text-align: center;
}
.step .s-emoji { font-size: 2.4rem; margin-bottom: 12px; }
.step h3 { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 8px; }
.step p { font-size: 0.92rem; color: #b9d9e8; line-height: 1.55; }
.step .s-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--coral); font-weight: 800; font-size: 0.85rem;
  margin-bottom: 12px;
}

/* ============ DELIVERY ============ */
.delivery { padding: 60px 0; }
.delivery-box {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px;
  align-items: center;
}
.delivery h2 { font-family: var(--font-head); font-size: 1.7rem; color: var(--deep); margin-bottom: 12px; }
.delivery p { color: var(--ink-soft); line-height: 1.65; margin-bottom: 10px; }
.delivery .areas {
  font-weight: 700; color: var(--ink);
  background: var(--foam); border-radius: 12px; padding: 14px 16px;
  font-size: 0.94rem; line-height: 1.6;
}
.delivery-art { text-align: center; font-size: 6rem; line-height: 1; }

/* ============ FOOTER ============ */
.site-footer { background: var(--deeper); color: #9dbdd1; padding: 56px 0 110px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.site-footer h4 { font-family: var(--font-head); color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.site-footer p, .site-footer li { font-size: 0.92rem; line-height: 1.7; }
.site-footer ul { list-style: none; }
.site-footer a { text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--aqua); }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; color: #fff; margin-bottom: 12px; }
.footer-logo svg { width: 34px; height: 34px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 22px; font-size: 0.84rem; text-align: center;
}

/* ============ CART DRAWER ============ */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 33, 56, 0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(430px, 100vw);
  background: var(--sand);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -12px 0 40px rgba(4, 33, 56, 0.25);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; background: var(--deep); color: #fff;
}
.drawer-head h3 { font-family: var(--font-head); font-size: 1.25rem; }
.drawer-close {
  width: 38px; height: 38px; border-radius: 50%; color: #fff;
  font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.12); transition: background 0.2s;
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.25); }

.drawer-items { flex: 1; overflow-y: auto; padding: 16px 18px; }
.cart-empty { text-align: center; color: var(--ink-soft); padding: 50px 20px; }
.cart-empty .big { font-size: 3rem; margin-bottom: 12px; }

.cart-row {
  display: flex; gap: 12px; align-items: center;
  background: #fff; border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(6, 48, 78, 0.07);
}
.cart-row .ci-art {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cart-row .ci-art svg { width: 70%; height: 70%; }
.cart-row .ci-info { flex: 1; min-width: 0; }
.cart-row .ci-name { font-weight: 800; font-size: 0.9rem; line-height: 1.25; }
.cart-row .ci-meta { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }
.cart-row .ci-line { font-weight: 800; font-size: 0.86rem; color: var(--coral-dark); margin-top: 2px; }
.cart-row .stepper { background: var(--foam); }
.cart-row .stepper button { color: var(--deep); width: 28px; height: 28px; font-size: 1rem; }
.cart-row .stepper .qty { color: var(--deep); font-size: 0.9rem; min-width: 22px; }

.drawer-form { padding: 6px 18px 0; }
.drawer-form label { font-size: 0.8rem; font-weight: 800; color: var(--ink-soft); display: block; margin: 8px 0 4px; }
.drawer-form input, .drawer-form textarea {
  width: 100%; padding: 11px 14px;
  border: 2px solid #e3edf3; border-radius: 12px;
  font-family: inherit; font-size: 0.95rem; color: var(--ink);
  background: #fff; outline: none; transition: border-color 0.2s;
  resize: none;
}
.drawer-form input:focus, .drawer-form textarea:focus { border-color: var(--teal); }

.drawer-foot {
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  background: #fff; box-shadow: 0 -6px 20px rgba(6, 48, 78, 0.08);
}
.total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-head); margin-bottom: 12px;
}
.total-row span { font-size: 1rem; color: var(--ink-soft); font-weight: 700; }
.total-row b { font-size: 1.45rem; color: var(--deep); }
.checkout-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--wa); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  padding: 15px; border-radius: 99px;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
  transition: background 0.2s, transform 0.15s;
}
.checkout-btn:hover { background: var(--wa-dark); transform: translateY(-1px); }
.checkout-btn:active { transform: scale(0.98); }
.checkout-btn[disabled] { background: #c3d2dc; box-shadow: none; cursor: not-allowed; }
.checkout-note { text-align: center; font-size: 0.76rem; color: var(--ink-soft); margin-top: 9px; }

/* ============ FLOATING WHATSAPP ============ */
.wa-float {
  position: fixed; left: 18px; bottom: 18px; z-index: 80;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ============ MOBILE CART BAR ============ */
.mobile-bar {
  position: fixed; left: 12px; right: 12px; z-index: 70;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: none; align-items: center; justify-content: space-between;
  background: var(--deep); color: #fff;
  padding: 13px 20px; border-radius: 99px;
  box-shadow: var(--shadow-lg);
  font-weight: 800;
  transform: translateY(120px); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-bar.show { transform: translateY(0); }
.mobile-bar .mb-total { font-family: var(--font-head); font-size: 1.05rem; }
.mobile-bar .mb-cta { display: flex; align-items: center; gap: 8px; color: var(--aqua); }

/* ============ TOAST ============ */
.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 110;
  transform: translate(-50%, 20px);
  background: var(--deep); color: #fff;
  font-weight: 800; font-size: 0.92rem;
  padding: 12px 22px; border-radius: 99px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: all 0.28s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .delivery-box { grid-template-columns: 1fr; padding: 28px 22px; }
  .delivery-art { font-size: 4rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .header-call .call-text { display: none; }
  .cart-btn .cart-label { display: none; }
  .cart-btn { padding: 10px 13px; }
  .hero { padding: 40px 0 110px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-name { font-size: 0.94rem; }
  .card-desc { display: none; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 9px; }
  .price { display: flex; align-items: baseline; gap: 6px; }
  .add-btn, .stepper { justify-content: center; }
  .controls { top: 58px; }
  .mobile-bar { display: flex; }
  .trust-grid { padding: 16px 14px; }
  .trust-item .t-emoji { width: 40px; height: 40px; font-size: 1.3rem; border-radius: 11px; }
  .trust-item b { font-size: 0.82rem; }
  .trust-item span { font-size: 0.72rem; }
  .wa-float { width: 50px; height: 50px; }
  .wa-float svg { width: 26px; height: 26px; }
  body.has-bar .wa-float { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-fish, .bubble, .hero-cry { animation: none; }
  html { scroll-behavior: auto; }
}
