/*=========================================================
KENEIE — EXOCOMMERCE

FILE:
assets/css/storefront.css

VERSION:
1.2 — MATCHED STOREFRONT

COMPATIBILITY:
index.php V1.0
storefront.js V1.1

DESIGN:
- Dark pink, baby blue, white and black
- Two-column discovery feed
- Four products per JavaScript batch
- Lightweight responsive design
- Mobile and desktop storefront
=========================================================*/


/* =====================================================
   DESIGN SYSTEM
===================================================== */

:root {
  --kn-black: #17131b;
  --kn-dark: #28212d;
  --kn-pink: #f3a6c8;
  --kn-pink-strong: #ed78ab;
  --kn-pink-soft: #fce8f1;
  --kn-blue: #bdeaf6;
  --kn-blue-soft: #e8f8fd;
  --kn-white: #ffffff;
  --kn-background: #faf9fb;
  --kn-text: #201c24;
  --kn-muted: #77717d;
  --kn-border: #ece8ee;
  --kn-radius: 16px;
  --kn-content-width: 1180px;
  --kn-header-height: 76px;
  --kn-shadow: 0 5px 24px rgba(24,17,29,.06);
}


/* =====================================================
   RESET
===================================================== */

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

html {
  scroll-behavior: smooth;
}

body.kn-app {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--kn-background);
  color: var(--kn-text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--kn-pink-strong);
  outline-offset: 3px;
}

.kn-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.kn-skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 1000;
  padding: 12px 16px;
  background: white;
  color: black;
}

.kn-skip-link:focus {
  top: 12px;
}


/* =====================================================
   HEADER
===================================================== */

.kn-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--kn-header-height);
  background: var(--kn-black);
}

.kn-header-inner {
  width: min(calc(100% - 40px), var(--kn-content-width));
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.kn-logo {
  flex-shrink: 0;
  color: var(--kn-pink);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1.5px;
}

.kn-logo::first-letter {
  color: var(--kn-blue);
}


/* =====================================================
   SEARCH
===================================================== */

.kn-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 570px;
  height: 43px;
  padding: 4px;
  background: white;
  border-radius: 40px;
}

.kn-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 17px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--kn-text);
  font-size: 13px;
}

.kn-search input::placeholder {
  color: #96909b;
}

.kn-search-button {
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 50%;
  background: var(--kn-pink-strong);
  color: white;
  font-size: 23px;
  line-height: 1;
}


/* =====================================================
   HEADER ACTIONS
===================================================== */

.kn-header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.kn-icon-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  font-size: 25px;
}

.kn-icon-button:hover {
  color: var(--kn-pink);
}

.kn-cart-count {
  position: absolute;
  top: -3px;
  right: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 2px 4px;
  border-radius: 20px;
  background: var(--kn-pink-strong);
  color: white;
  font-size: 10px;
  font-weight: 700;
}


/* =====================================================
   CATEGORY NAVIGATION
===================================================== */

.kn-categories {
  position: relative;
  z-index: 20;
  width: 100%;
  background: white;
  border-bottom: 1px solid var(--kn-border);
}

.kn-categories-inner {
  display: flex;
  align-items: center;
  gap: 25px;
  width: min(calc(100% - 40px), var(--kn-content-width));
  margin: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.kn-categories-inner::-webkit-scrollbar {
  display: none;
}

.kn-category {
  flex-shrink: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--kn-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.kn-category:hover {
  color: var(--kn-pink-strong);
}

.kn-category.active {
  color: var(--kn-black);
  border-bottom-color: var(--kn-pink-strong);
}


/* =====================================================
   MAIN WORKSPACE
===================================================== */

.kn-main {
  width: min(calc(100% - 40px), var(--kn-content-width));
  margin: 0 auto;
  padding-bottom: 65px;
}


/* =====================================================
   INTRO / HERO
===================================================== */

.kn-intro {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 230px;
  margin-top: 25px;
  padding: 35px 45px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(
    115deg,
    #f7c6dc 0%,
    #fce5ef 45%,
    #d7f2fa 100%
  );
}

.kn-intro::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -150px;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
  pointer-events: none;
}

.kn-intro-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.kn-eyebrow {
  display: block;
  margin-bottom: 12px;
  color: #8d4167;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.kn-intro h1 {
  margin: 0;
  color: var(--kn-black);
  font-size: clamp(29px,4vw,49px);
  font-weight: 900;
  letter-spacing: -1.7px;
  line-height: 1.08;
}

.kn-intro h1 span {
  color: #d85491;
}

.kn-intro p {
  max-width: 470px;
  margin: 15px 0 0;
  color: #594e5d;
  font-size: 14px;
  line-height: 1.7;
}


/* =====================================================
   DISCOVERY TOOLBAR
===================================================== */

.kn-discovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 35px;
  margin-bottom: 18px;
}

.kn-discovery-heading {
  display: flex;
  align-items: baseline;
  gap: 13px;
  min-width: 0;
}

.kn-discovery h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.kn-discovery-subtitle {
  color: var(--kn-muted);
  font-size: 12px;
}

.kn-discovery-controls {
  flex-shrink: 0;
}

.kn-sort {
  max-width: 190px;
  padding: 10px 15px;
  border: 1px solid var(--kn-border);
  border-radius: 10px;
  background: white;
  color: var(--kn-text);
  font-size: 12px;
}


/* =====================================================
   PRODUCT FEED — TWO COLUMNS
===================================================== */

.kn-feed-section {
  width: 100%;
}

.kn-product-feed {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: start;
  gap: 18px;
  width: 100%;
  min-width: 0;
}


/* =====================================================
   PRODUCT CARDS
===================================================== */

.kn-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--kn-radius);
  background: white;
  box-shadow: var(--kn-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.kn-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(24,17,29,.1);
}

.kn-product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--kn-pink-soft);
}

.kn-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.kn-product-card:hover .kn-product-image img {
  transform: scale(1.035);
}

.kn-product-favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--kn-black);
  font-size: 24px;
  line-height: 1;
}

.kn-product-favorite.active {
  color: var(--kn-pink-strong);
}

.kn-product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px;
}

.kn-product-title {
  margin: 0 0 7px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.kn-product-seller {
  margin-bottom: 10px;
  color: var(--kn-muted);
  font-size: 11px;
}

.kn-product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.kn-product-price {
  color: var(--kn-black);
  font-size: 18px;
  font-weight: 900;
}

.kn-product-add {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--kn-pink-strong);
  color: white;
  font-size: 24px;
  line-height: 1;
}

.kn-product-add:hover {
  background: #da5794;
}


/* =====================================================
   INFINITE SCROLL / STATUS
===================================================== */

.kn-feed-status {
  min-height: 55px;
  padding: 35px 15px;
  color: var(--kn-muted);
  font-size: 13px;
  text-align: center;
}

.kn-load-more {
  display: block;
  margin: 10px auto 0;
  padding: 13px 28px;
  border: 0;
  border-radius: 30px;
  background: var(--kn-black);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.kn-load-more:hover {
  background: var(--kn-dark);
}


/* =====================================================
   CART PANEL
===================================================== */

.kn-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  width: min(420px,100%);
  background: white;
  box-shadow: -10px 0 40px rgba(0,0,0,.12);
  transform: translateX(105%);
  transition: transform .25s ease;
  visibility: hidden;
}

.kn-cart-panel.open {
  transform: translateX(0);
  visibility: visible;
}

.kn-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  border-bottom: 1px solid var(--kn-border);
}

.kn-cart-header h2 {
  margin: 0;
  font-size: 21px;
}

.kn-cart-close {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 30px;
}

.kn-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.kn-cart-item {
  display: flex;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--kn-border);
}

.kn-cart-item img {
  flex-shrink: 0;
  width: 75px;
  height: 90px;
  object-fit: cover;
  border-radius: 9px;
}

.kn-cart-item-details {
  flex: 1;
  min-width: 0;
}

.kn-cart-item-title {
  font-size: 13px;
  font-weight: 700;
}

.kn-cart-item-price {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
}

.kn-cart-remove {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b54b78;
  font-size: 11px;
}

.kn-cart-footer {
  padding: 22px;
  border-top: 1px solid var(--kn-border);
}

.kn-cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 16px;
}

.kn-checkout-button {
  width: 100%;
  padding: 15px;
  border: 0;
  border-radius: 12px;
  background: var(--kn-black);
  color: white;
  font-weight: 800;
}

.kn-checkout-button:hover:not(:disabled) {
  background: var(--kn-pink-strong);
}


/* =====================================================
   OVERLAY
===================================================== */

.kn-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(15,10,19,.55);
}


/* =====================================================
   NOTIFICATION TOAST
===================================================== */

.kn-toast {
  position: fixed;
  left: 50%;
  bottom: 35px;
  z-index: 500;
  max-width: calc(100% - 32px);
  padding: 13px 22px;
  border-radius: 30px;
  background: var(--kn-black);
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%,15px);
  transition: opacity .2s ease, transform .2s ease;
}

.kn-toast.visible {
  opacity: 1;
  transform: translate(-50%,0);
}


/* =====================================================
   FOOTER
===================================================== */

.kn-footer {
  border-top: 1px solid var(--kn-border);
  background: white;
}

.kn-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 40px),var(--kn-content-width));
  min-height: 80px;
  margin: auto;
  color: var(--kn-muted);
  font-size: 11px;
}

.kn-footer-brand {
  color: var(--kn-pink-strong);
  font-size: 19px;
  font-weight: 900;
}


/* =====================================================
   MOBILE NAVIGATION
===================================================== */

.kn-mobile-nav {
  display: none;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

  .kn-header-inner {
    gap: 18px;
  }

  .kn-logo {
    font-size: 24px;
  }

  .kn-intro {
    min-height: 200px;
  }

  .kn-product-feed {
    gap: 14px;
  }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

  :root {
    --kn-header-height: 65px;
  }

  .kn-header-inner {
    width: calc(100% - 22px);
    gap: 10px;
  }

  .kn-logo {
    font-size: 19px;
    letter-spacing: -1px;
  }

  .kn-search {
    height: 36px;
    padding: 3px;
  }

  .kn-search input {
    padding: 0 9px;
    font-size: 11px;
  }

  .kn-search-button {
    width: 29px;
    height: 29px;
    font-size: 19px;
  }

  .kn-header-actions {
    gap: 5px;
  }

  .kn-icon-button {
    width: 27px;
    height: 34px;
    font-size: 21px;
  }

  #kn-account-button,
  #kn-favorites-button {
    display: none;
  }

  .kn-categories-inner {
    width: calc(100% - 22px);
    gap: 19px;
  }

  .kn-category {
    padding: 13px 0;
    font-size: 12px;
  }

  .kn-main {
    width: calc(100% - 22px);
    padding-bottom: 100px;
  }

  .kn-intro {
    min-height: 175px;
    margin-top: 13px;
    padding: 24px 20px;
    border-radius: 14px;
  }

  .kn-intro h1 {
    font-size: 29px;
    letter-spacing: -1px;
  }

  .kn-intro p {
    font-size: 11px;
    line-height: 1.6;
  }

  .kn-eyebrow {
    font-size: 9px;
  }

  .kn-discovery {
    margin-top: 25px;
    margin-bottom: 13px;
  }

  .kn-discovery h2 {
    font-size: 20px;
  }

  .kn-discovery-subtitle {
    display: none;
  }

  .kn-sort {
    max-width: 150px;
    padding: 8px;
    font-size: 11px;
  }

  .kn-product-feed {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }

  .kn-product-card {
    border-radius: 12px;
  }

  .kn-product-info {
    padding: 10px;
  }

  .kn-product-title {
    font-size: 12px;
  }

  .kn-product-seller {
    font-size: 10px;
  }

  .kn-product-price {
    font-size: 14px;
  }

  .kn-product-add {
    width: 29px;
    height: 29px;
    font-size: 20px;
  }

  .kn-product-favorite {
    top: 7px;
    right: 7px;
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  .kn-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    display: grid;
    grid-template-columns: repeat(5,1fr);
    min-height: 67px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--kn-border);
    background: white;
  }

  .kn-mobile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    border: 0;
    background: transparent;
    color: var(--kn-muted);
    font-size: 10px;
  }

  .kn-mobile-link span:first-child {
    font-size: 22px;
  }

  .kn-mobile-link.active {
    color: var(--kn-pink-strong);
  }

  .kn-footer {
    display: none;
  }

  .kn-toast {
    bottom: 85px;
  }

}


/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }

}