/***
====================================================================
  Keranad – Shop page (shop.html)
  Builds on material.css tokens and product-card.css cards.
====================================================================
***/

/* ------------------------------------------------------------------
   Banner
------------------------------------------------------------------ */
.shop-hero {
  position: relative;
  margin: 0 20px;
  padding: 70px 0 64px;
  border-radius: var(--md-shape-xl);
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(45% 120% at 100% 0%, rgba(248, 202, 56, 0.35), rgba(248, 202, 56, 0) 60%),
    linear-gradient(120deg, var(--brand-green) 0%, var(--brand-green-deep) 100%);
}

.shop-hero:after {
  /* a few drifting bubbles, as on the home page features strip */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 228, 138, 0.35) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 2px, transparent 3px);
  background-size: 220px 240px, 150px 170px;
  background-position: 30px 0, 100px 60px;
  animation: shop-bubbles 16s linear infinite;
}

@keyframes shop-bubbles {
  to {
    background-position: 30px -240px, 100px -170px;
  }
}

.shop-hero .auto-container {
  position: relative;
  z-index: 1;
}

.shop-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.shop-breadcrumb a {
  color: var(--brand-yellow-light);
}

.shop-breadcrumb a:hover {
  color: #ffffff;
}

.shop-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.shop-hero p {
  max-width: 560px;
  margin: 0 0 24px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
}

.shop-hero__perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-hero__perks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--md-shape-full);
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 500;
}

.shop-hero__perks i {
  color: var(--brand-yellow);
}

/* ------------------------------------------------------------------
   Toolbar: filter chips, search, sort
------------------------------------------------------------------ */
.shop-section {
  padding: 50px 0 90px;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.shop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-shape-sm);
  background: var(--md-surface);
  color: var(--md-on-surface-variant);
  font-family: var(--title-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--md-duration-short) var(--md-ease-standard),
    border-color var(--md-duration-short) var(--md-ease-standard),
    color var(--md-duration-short) var(--md-ease-standard),
    padding var(--md-duration-medium) var(--md-ease-emphasized);
}

.shop-chip:hover {
  background: var(--md-surface-container-low);
}

.shop-chip:focus-visible {
  outline: 3px solid var(--md-primary);
  outline-offset: 2px;
}

/* selected chip gets a check mark that grows in */
.shop-chip:before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 11px;
  width: 0;
  overflow: hidden;
  opacity: 0;
  transition: width var(--md-duration-medium) var(--md-ease-emphasized),
    opacity var(--md-duration-short) var(--md-ease-standard);
}

.shop-chip.is-selected {
  border-color: transparent;
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  font-weight: 600;
}

.shop-chip.is-selected:before {
  width: 12px;
  opacity: 1;
}

.shop-chip__count {
  font-size: 12px;
  opacity: 0.7;
}

.shop-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.shop-search,
.shop-sort {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  margin: 0;
  border-radius: var(--md-shape-full);
  background: var(--md-surface-container-low);
  transition: box-shadow var(--md-duration-short) var(--md-ease-standard);
}

.shop-search:focus-within,
.shop-sort:focus-within {
  box-shadow: 0 0 0 2px var(--md-primary);
}

.shop-search i {
  position: absolute;
  left: 16px;
  font-size: 14px;
  color: var(--md-on-surface-variant);
}

.shop-search input {
  width: 230px;
  height: 100%;
  padding: 0 18px 0 42px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--md-on-surface);
  font-size: 15px;
  outline: none;
}

.shop-sort select {
  height: 100%;
  padding: 0 42px 0 18px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--md-on-surface);
  font-size: 15px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.shop-sort i {
  position: absolute;
  right: 18px;
  pointer-events: none;
  color: var(--md-on-surface-variant);
}

.shop-count {
  margin: 22px 0 26px;
  font-size: 14px;
  color: var(--md-on-surface-variant);
}

/* ------------------------------------------------------------------
   Product grid (cards come from product-card.css)
------------------------------------------------------------------ */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 32px 28px;
}

.kp-cell {
  container-type: inline-size;
  display: flex;
}

.kp-cell .kp-card {
  width: 100%;
}

.kp-cell.is-hidden {
  display: none;
}

.kp-meta {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 10px;
  border-radius: var(--md-shape-sm);
  background: var(--md-surface-container-low);
  font-size: 12px;
  font-weight: 500;
  color: var(--md-on-surface-variant);
}

.kp-price--soon {
  font-size: 18px;
  color: var(--maliku-gold, #8a6420);
}

.kp-cell.is-coming-soon .kp-media img {
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.25)) saturate(0.95);
}

/* enter / leave motion used by shop-page.js */
.kp-cell.is-entering {
  animation: shop-enter var(--md-duration-long) var(--md-ease-emphasized-decelerate) both;
}

@keyframes shop-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}

/* ------------------------------------------------------------------
   Empty state
------------------------------------------------------------------ */
.shop-empty {
  padding: 60px 20px;
  border-radius: var(--md-shape-xl);
  background: var(--md-surface-container-low);
  text-align: center;
}

.shop-empty > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  font-size: 22px;
}

.shop-empty h4 {
  margin-bottom: 6px;
}

.shop-empty p {
  margin-bottom: 20px;
}

/* ------------------------------------------------------------------
   Perks strip
------------------------------------------------------------------ */
.shop-perks {
  padding: 0 0 100px;
}

.shop-perks ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-perks li {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 20px;
  border-radius: var(--md-shape-lg);
  background: var(--md-surface-container-low);
}

.shop-perks .icon {
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--md-shape-md);
  background: var(--brand-yellow);
  color: var(--brand-green-deep);
  font-size: 18px;
}

.shop-perks strong {
  font-family: var(--title-font);
  font-size: 16px;
  color: var(--headings-color);
}

.shop-perks li > span:last-child {
  font-size: 13px;
  line-height: 1.4;
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 991px) {
  .shop-perks ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .shop-hero {
    margin: 0 12px;
    padding: 48px 0 44px;
  }
  .shop-controls,
  .shop-search {
    width: 100%;
  }
  .shop-search input {
    width: 100%;
  }
  .shop-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -15px;
    padding: 2px 15px 6px;
    scrollbar-width: none;
  }
  .shop-chips::-webkit-scrollbar {
    display: none;
  }
  .shop-chip {
    flex-shrink: 0;
  }
}

@media (max-width: 575px) {
  .shop-perks ul {
    grid-template-columns: 1fr;
  }
  .shop-grid {
    grid-template-columns: 1fr;
  }
}
