/* Homepage extras — hero banners, category network, shelves, promo trio */
.bk-hero--banner {
  min-height: clamp(220px, 38vw, 520px);
  background: #e8edf4;
}
.bk-hero--banner .bk-hero__slide {
  pointer-events: none;
}
.bk-hero--banner .bk-hero__slide.is-active {
  pointer-events: auto;
}
.bk-hero__link {
  display: block;
  position: absolute;
  inset: 0;
}
.bk-hero--banner .bk-hero__poster {
  object-fit: cover;
}
.bk-hero--banner .bk-hero__dots {
  bottom: 1rem;
}

/* Categories network */
.bk-cats {
  padding: 3rem 0 2.5rem;
  position: relative;
  z-index: 5;
  overflow: visible;
  background:
    radial-gradient(circle at 12% 20%, rgba(212, 163, 115, 0.12), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(122, 143, 166, 0.12), transparent 40%),
    #f7f5f1;
}
.bk-cats__head {
  text-align: center;
  margin-bottom: 1.75rem;
}
.bk-cats__title {
  margin: 0;
  font-family: var(--font-serif, Georgia, serif);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  color: #1e293b;
}
.bk-cats__lead {
  margin: 0.4rem 0 0;
  color: #64748b;
}
.bk-cats__hub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1rem;
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  overflow: visible;
}
.bk-cats__node {
  position: relative;
  z-index: 1;
  animation: bk-cat-in 0.45s ease both;
  animation-delay: var(--cat-delay, 0ms);
}
.bk-cats__node.is-open {
  z-index: 200;
}
.bk-cats__node:has(.bk-cats__main.is-open),
.bk-cats__node:has(.bk-cats__branch:not([hidden])) {
  z-index: 200;
}
@keyframes bk-cat-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.bk-cats__main {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(30, 41, 59, 0.12);
  background: #fff;
  color: #1e293b;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(30, 41, 59, 0.06);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.bk-cats__main:hover,
.bk-cats__main.is-open {
  border-color: #d4a373;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(30, 41, 59, 0.1);
}
.bk-cats__pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d4a373;
  box-shadow: 0 0 0 0 rgba(212, 163, 115, 0.45);
  animation: bk-pulse 2s ease infinite;
}
@keyframes bk-pulse {
  70% { box-shadow: 0 0 0 8px rgba(212, 163, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 163, 115, 0); }
}
.bk-cats__count {
  min-width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  background: #1e293b;
  color: #fff;
}
.bk-cats__branch {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.35rem);
  transform: translateX(-50%);
  z-index: 210;
  min-width: 220px;
  padding-top: 0.65rem;
}
.bk-cats__subs {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(30, 41, 59, 0.1);
  box-shadow: 0 18px 40px rgba(30, 41, 59, 0.18);
  position: relative;
  z-index: 1;
}
.bk-cats__stem {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0.65rem;
  background: linear-gradient(#d4a373, rgba(212, 163, 115, 0.2));
}
.bk-cats__sub {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  background: #f8fafc;
}
.bk-cats__sub:hover {
  background: #1e293b;
  color: #fff;
}
.bk-cats__sub--all {
  font-weight: 600;
  background: transparent;
  border: 1px dashed rgba(30, 41, 59, 0.2);
}

/* Promo trio */
.bk-trio {
  padding: 1.75rem 0 2.25rem;
  background: var(--color-forest-deep, #141D2B);
}
.bk-trio__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.bk-trio__card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 180px;
  padding: 1.15rem 1.2rem;
  border-radius: 0.4rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background-color: #1e293b;
  background-image: var(--banner-image);
  background-size: cover;
  background-position: center;
  transition: transform 0.2s ease;
}
.bk-trio__card:hover { transform: translateY(-2px); }
.bk-trio__shade {
  display: none;
}
.bk-trio__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  max-width: 85%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.45rem;
  background: rgba(20, 29, 43, 0.82);
  backdrop-filter: blur(2px);
}
.bk-trio__copy strong {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
}
.bk-trio__copy span {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.92);
}

/* Shelf layouts (books + stationery) */
.bk-shelf {
  padding: 2rem 0 2.5rem;
  background: #f3f4f6;
}
.bk-shelf--stationery { background: #fff; padding-top: 1.5rem; }
.bk-shelf__banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.bk-shelf__banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 170px;
  padding: 1.15rem 1.2rem;
  border-radius: 0.4rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background-color: #1e293b;
  background-image: var(--banner-image);
  background-size: cover;
  background-position: center;
}
.bk-shelf__banner-shade {
  display: none;
}
.bk-shelf__banner-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  max-width: 80%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.45rem;
  background: rgba(20, 29, 43, 0.82);
  backdrop-filter: blur(2px);
}
.bk-shelf__banner-copy strong {
  font-size: 1.2rem;
  letter-spacing: 0.03em;
}
.bk-shelf__banner-copy span {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
}
.bk-shelf__layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.bk-shelf__heading {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
}
.bk-shelf__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}
.bk-shelf__tab {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.45rem 0;
  cursor: pointer;
}
.bk-shelf__tab.is-active,
.bk-shelf__tab:hover {
  color: #0f172a;
}
.bk-shelf__browse {
  display: inline-block;
  margin-top: 1rem;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.bk-shelf__main {
  position: relative;
  min-width: 0;
}
.bk-shelf__viewport.is-loading { opacity: 0.5; pointer-events: none; }
.bk-shelf__empty {
  color: #64748b;
  padding: 1.5rem 0;
}

/* Shared product carousels */
.bk-carousel {
  position: relative;
  min-width: 0;
  padding: 0 1.65rem;
}
.bk-carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bk-carousel__viewport::-webkit-scrollbar { display: none; }
.bk-carousel__track {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
  width: max-content;
  min-width: 100%;
  padding: 0.15rem 0 0.35rem;
}
.bk-carousel__item {
  flex: 0 0 auto;
  width: 14.5rem;
  scroll-snap-align: start;
  display: flex;
}
.bk-carousel__item .product-card--book {
  max-width: none;
  width: 100%;
  margin: 0;
  height: 100%;
}
.bk-carousel__item--shelf {
  width: 16rem;
}
.bk-carousel__arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 5;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #1e293b;
  font-size: 1.15rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.1);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.bk-carousel__arrow:hover {
  background: #1e293b;
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}
.bk-carousel__arrow--prev { left: 0; }
.bk-carousel__arrow--next { right: 0; }
.bk-carousel--shelf {
  min-width: 0;
}
.bk-showcase-card .bk-carousel {
  margin-top: 0.35rem;
  container-type: inline-size;
  container-name: showcase-row;
}
.bk-showcases .bk-carousel__viewport {
  container-type: inline-size;
}
/* Keep at least ~6 products visible in category carousels */
.bk-showcases .bk-carousel__item {
  width: calc((100cqw - 2rem) / 6.15);
  max-width: none;
}
.bk-showcases .product-card--book .product-card__media {
  min-height: 0;
  aspect-ratio: 2 / 3;
}
.bk-showcases .product-card--book .product-card__media img {
  padding: 0.35rem;
}
.bk-carousel__item .product-card--book .product-card__media {
  min-height: 12.25rem;
}

@media (max-width: 900px) {
  .bk-carousel {
    padding: 0 0.35rem;
  }
  .bk-carousel__item {
    width: calc((100% - 0.4rem) / 2.15);
    max-width: 11.5rem;
  }
  .bk-carousel__item--shelf {
    width: calc((100% - 0.4rem) / 2.15);
    max-width: 12.5rem;
  }
  .bk-carousel__track {
    gap: 0.35rem;
  }
  .bk-carousel__arrow {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 1.05rem;
  }

  /* Category product sliders: ~1.5 books + less side padding */
  .bk-showcases .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .bk-showcase-card {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }
  .bk-showcase-card .bk-carousel {
    padding: 0;
    margin: 0;
  }
  .bk-showcases .bk-carousel__viewport {
    margin: 0;
    padding: 0;
  }
  .bk-showcases .bk-carousel__track {
    gap: 0.3rem;
    padding-left: 0;
    padding-right: 0;
  }
  .bk-showcases .bk-carousel__item {
    width: calc((100cqw - 0.3rem) / 1.5);
    max-width: none;
  }
  .bk-showcase-card .bk-carousel__arrow--prev { left: 0; }
  .bk-showcase-card .bk-carousel__arrow--next { right: 0; }
}

/* Phone: new arrivals / bestsellers show ~2 at a time */
@media (max-width: 640px) {
  .bk-section .bk-carousel {
    padding: 0 0.2rem;
  }
  .bk-section .bk-carousel__item {
    width: calc((100vw - 1.5rem - 0.35rem) / 2.1);
    max-width: none;
  }
}


.shelf-card {
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 0.35rem;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
  height: 100%;
  width: 100%;
  box-shadow: 0 4px 16px -8px rgba(30, 41, 59, 0.18);
}
.shelf-card__media-wrap {
  position: relative;
}
.shelf-card__media {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #f1f5f9;
  border-radius: 0.2rem;
}
.shelf-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.15rem;
}
.shelf-card .product-card__badge {
  top: 0.4rem;
  left: 0.4rem;
  font-size: 0.62rem;
  padding: 0.22rem 0.45rem;
}
.shelf-card__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.5em;
}
.shelf-card__title a {
  color: #1e293b;
  text-decoration: none;
}
.shelf-card__price {
  color: #db2777;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: auto;
}
.bk-shelf--stationery .shelf-card__price { color: #dc2626; }
.shelf-card .btn-add-cart {
  margin-top: 0.15rem;
  font-size: 0.74rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.2rem;
}
.shelf-card .wishlist-heart {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}
.shelf-card .shelf-card__cart { display: none; }

@media (max-width: 900px) {
  .bk-trio__grid,
  .bk-shelf__banners { grid-template-columns: 1fr; }
  .bk-shelf__layout { grid-template-columns: 1fr; }
  .bk-shelf__nav {
    display: grid;
    gap: 0.5rem;
  }
  .bk-shelf__list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 0.5rem;
  }
  .bk-shelf__tab {
    white-space: nowrap;
    padding: 0.45rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
  }
  .bk-shelf__tab.is-active {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
  }
  .bk-trio__card,
  .bk-shelf__banner { min-height: 150px; }
}

@media (max-width: 560px) {
  .bk-cats__branch {
    position: static;
    transform: none;
    min-width: 0;
    width: 100%;
  }
  .bk-cats__node { width: 100%; }
  .bk-cats__main { width: 100%; justify-content: space-between; }
}

/* ===========================================================
   Homepage coupons � two-row slider
   =========================================================== */
.bk-coupons {
  position: relative;
  padding: clamp(2.75rem, 5.5vw, 4.5rem) 0;
  overflow: hidden;
  color: #F8F4E9;
  background:
    linear-gradient(125deg, rgba(212,163,115,0.12) 0%, transparent 42%),
    linear-gradient(180deg, #0f1520 0%, #141D2B 40%, #1a2436 100%);
}

.bk-coupons__mesh {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(212,163,115,0.22), transparent 28%),
    radial-gradient(circle at 88% 70%, rgba(232,201,168,0.12), transparent 32%),
    linear-gradient(rgba(248,244,233,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248,244,233,0.03) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
}

.bk-coupons .container { position: relative; z-index: 1; }

.bk-coupons__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.bk-coupons .bk-label--gold {
  color: #E8C9A8;
  letter-spacing: 0.22em;
}

.bk-coupons .bk-title--cream {
  color: #F8F4E9;
  margin: 0.3rem 0 0.45rem;
}

.bk-coupons__lead {
  margin: 0;
  max-width: 28rem;
  color: rgba(248, 244, 233, 0.62);
  font-size: 0.98rem;
}

.bk-coupons__controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.bk-coupons__arrow {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 163, 115, 0.45);
  background: rgba(255, 255, 255, 0.04);
  color: #E8C9A8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.bk-coupons__arrow:hover {
  background: rgba(212, 163, 115, 0.18);
  border-color: #D4A373;
  transform: translateY(-1px);
}

.bk-coupons__shop {
  margin-left: 0.35rem;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #D4A373;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.bk-coupons__shop:hover {
  color: #E8C9A8;
  border-bottom-color: #D4A373;
}

.bk-coupons__slider { position: relative; }

.bk-coupons__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.35rem;
}

.bk-coupons__viewport::-webkit-scrollbar { display: none; }

/* Two rows: fill column-wise, then scroll horizontally */
.bk-coupons__track {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 0.85rem 1rem;
  width: max-content;
  padding: 0.15rem 0.1rem 0.5rem;
}

.bk-coupon {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 118px;
  border-radius: 14px;
  overflow: hidden;
  color: #3d2c1c;
  background: linear-gradient(145deg, #FFFDF8 0%, #F7F1E6 100%);
  border: 1px solid rgba(212, 163, 115, 0.4);
  box-shadow:
    0 14px 34px -20px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bk-coupon:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 40px -18px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 163, 115, 0.35);
}

.bk-coupon--tone-1 {
  background: linear-gradient(145deg, #FFF9F0 0%, #F3E8D8 100%);
}

.bk-coupon--tone-2 {
  background: linear-gradient(145deg, #FBF8F2 0%, #EDE4D4 100%);
}

.bk-coupon__ribbon {
  position: absolute;
  top: 8px;
  right: -22px;
  z-index: 2;
  width: 88px;
  text-align: center;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #141D2B;
  background: #D4A373;
  padding: 0.22rem 0;
  transform: rotate(35deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.bk-coupon__stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.75rem 0.4rem;
  background:
    radial-gradient(circle at 40% 25%, rgba(232, 201, 168, 0.28), transparent 55%),
    linear-gradient(165deg, #1E293B, #101826);
  color: #F8F4E9;
}

.bk-coupon__off {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #D4A373;
}

.bk-coupon__value {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: #E8C9A8;
}

.bk-coupon__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem 0.85rem 0.9rem;
}

.bk-coupon__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7A6F63;
}

.bk-coupon__expiry.is-urgent {
  color: #C0392B;
  font-weight: 600;
}

.bk-coupon__code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 1px dashed rgba(184, 136, 92, 0.55);
  border-radius: 8px;
  background: rgba(212, 163, 115, 0.1);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.bk-coupon__code:hover,
.bk-coupon__code.is-copied {
  background: rgba(212, 163, 115, 0.22);
  border-color: #D4A373;
  transform: scale(1.01);
}

.bk-coupon__code-text {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #141D2B;
}

.bk-coupon__copy {
  flex: none;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: #1E293B;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}

.bk-coupon__code.is-copied .bk-coupon__copy {
  background: #5B7C6A;
}

@media (prefers-reduced-motion: reduce) {
  .bk-coupons__viewport { scroll-behavior: auto; }
  .bk-coupon:hover { transform: none; }
}

@media (max-width: 720px) {
  .bk-coupons__track {
    grid-auto-columns: minmax(230px, 78vw);
    gap: 0.7rem;
  }
  .bk-coupon {
    grid-template-columns: 84px minmax(0, 1fr);
    min-height: 110px;
  }
  .bk-coupon__value { font-size: 1.35rem; }
  .bk-coupon__ribbon { display: none; }
}
