/* ---------- Inner page hero ---------- */
.page-hero {
  width: 100%;
  margin: 0;
  background: var(--color-cream);
  padding: 72px 0 56px;
  box-sizing: border-box;
}
.page-hero > .container {
  width: var(--content-col);
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}
.page-hero h1 { margin-bottom: 0.15em; font-size: clamp(48px, 8vw, 76px); }
.page-hero .lead {
  max-width: 560px;
  margin: 0;
  color: var(--color-text);
  font-size: 18px;
}

/* ---------- Books page hero (reference layout) ---------- */
.books-page-head {
  padding-top: 15px;
  padding-bottom: 8px;
}

.books-hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 15px 25px 15px 25px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #f3f0ff 48%, #eef6fc 100%);
  box-shadow: 0 1px 3px rgba(30, 91, 184, 0.06);
  overflow: hidden;
  box-sizing: border-box;
}

.books-hero__content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.books-hero__breadcrumb {
  margin-bottom: 18px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #78716c;
}

.books-hero__breadcrumb a {
  color: #78716c;
  text-decoration: none;
  transition: color var(--transition);
}

.books-hero__breadcrumb .breadcrumb-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.books-hero__breadcrumb a:hover {
  color: var(--color-primary);
}

.books-hero__breadcrumb-sep {
  color: #a8a29e;
}

.books-hero__breadcrumb span:last-child {
  color: var(--color-primary);
  font-weight: 500;
}

.books-hero__title {
  margin: 0 0 14px;
  font-family: Arial ,Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #1c1917;
}

.books-hero__desc {
  max-width: none;
  color: #57534e;
  font-size: 1rem;
  line-height: 1.65;
}

.books-hero__desc p {
  margin: 0;
}

.books-hero__desc p + p {
  margin-top: 0.75em;
}

.books-hero__content .woocommerce-notices-wrapper {
  margin-top: 16px;
}

.books-hero__art {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: auto;
  max-width: 320px;
  margin-left: auto;
  padding-right: 0;
}

.books-hero__art-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 900px) {
  .books-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 28px 24px 24px;
    gap: 20px;
  }

  .books-hero__content {
    flex: 1 1 auto;
    width: 100%;
  }

  .books-hero__art {
    width: auto;
    max-width: none;
    margin-left: auto;
    padding-right: 0;
    align-self: flex-end;
  }

  .books-hero__art-img {
    max-width: 260px;
  }
}

@media (max-width: 767px) {
  .books-page-head .books-hero__art,
  .tag-page-head .books-hero__art,
  .tag-hero .books-hero__art {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .books-page-head {
    padding-top: 16px;
  }

  .books-hero {
    padding: 22px 18px 20px;
    border-radius: 12px;
  }

  .books-hero__title {
    font-size: 1.75rem;
  }

  .books-hero__desc {
    font-size: 0.9375rem;
  }
}

/* ---------- Product tag archive (reference layout) ---------- */
.tag-page-head {
  padding-bottom: 24px;
}

.tag-hero {
  position: relative;
  gap: 20px;
  padding: 15px 25px;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(147, 197, 253, 0.35) 0%, transparent 55%),
    linear-gradient(135deg, #eef4ff 0%, #f3f8ff 45%, #eef6fc 100%);
  box-shadow: 0 2px 12px rgba(30, 91, 184, 0.08);
}

.tag-hero .books-hero__content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.tag-hero .books-hero__art {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: auto;
  max-width: 320px;
  margin-left: auto;
  padding-right: 0;
}

.tag-hero__title {
  margin-bottom: 12px;
}

.books-hero__title-text {
  position: relative;
  display: inline;
  color: #1e3a5f;
  /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M0 8 Q25 2 50 8 T100 8 T150 8 T200 8' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); */
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 10px;
  padding-bottom: 6px;
}

.tag-hero__desc {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: none;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #57534e;
}

.tag-hero__desc-icon {
  flex-shrink: 0;
  margin-top: 4px;
  color: #2563eb;
  display: block;
}

.tag-hero__desc-text {
  flex: 1;
  min-width: 0;
}

.tag-hero__desc-text p {
  margin: 0;
}

.tag-hero__desc-text p + p {
  margin-top: 0.75em;
}

.tag-page-body {
  padding-bottom: 80px;
}

.tag-page-grid {
  gap: 24px;
}

.tag-page-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: #78716c;
}

.tag-page-pagination {
  margin-top: 36px;
}

@media (max-width: 900px) {
  .tag-hero {
    padding: 28px 24px 24px;
  }

  .tag-hero .books-hero__content {
    width: 100%;
  }

  .tag-hero .books-hero__art {
    width: auto;
    max-width: none;
    margin-left: auto;
    align-self: flex-end;
  }
}

@media (max-width: 560px) {
  .tag-page-head {
    padding-bottom: 16px;
  }

  .tag-hero {
    padding: 20px 16px;
    border-radius: 12px;
  }
}

/* ---------- Shop: 25/75 ---------- */
.shop-band {
  width: 100%;
  background: var(--color-white);
}
.shop-layout {
  display: grid;
  grid-template-columns: 28% 1fr;
  gap: 36px;
  padding: 30px 0 80px;
  align-items: start;
  background: transparent;
  box-sizing: border-box;
}
.side-cart-mini {
  position: sticky;
  top: 120px;
  padding: 0;
}
.mini-cart-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-cream);
  color: var(--color-secondary);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}
.mini-cart-icon {
  position: relative;
  display: inline-flex;
  color: var(--color-blue);
}
.mini-cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-blue);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.shop-toolbar p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}
.shop-toolbar select {
  min-height: 42px;
  border: 1px solid var(--color-beige);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--color-white);
  color: var(--color-secondary);
}
.shop-card .meta {
  margin: 0 0 6px;
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Books sidebar (Explore Categories + Product Tags) ---------- */
.books-sidebar {
  gap: 20px;
}

.books-sidebar .side-block--search {
  background: transparent;
  border: 0;
  padding: 0;
}

.books-sidebar .shop-side-panel {
  background: #fff;
  border: 1px solid #f0ebe3;
  border-radius: 14px;
  padding: 22px 20px 20px;
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.04);
}

.books-sidebar .shop-side-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.books-sidebar .shop-side-panel__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.books-sidebar .shop-side-panel__icon--book {
  background: #e3f2fd;
  color: #1e5bb8;
}

.books-sidebar .shop-side-panel__icon--tag {
  background: #ebe3d6;
  color: #8b7355;
}

.books-sidebar .shop-side-panel__icon svg {
  display: block;
}

.books-sidebar .shop-side-panel__title {
  margin: 0;
  font-family: Arial,Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1c1917;
}

.books-sidebar .shop-side-panel__desc {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #78716c;
}

/* Category grid cards */
.books-sidebar .shop-cat-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.books-sidebar .shop-cat-grid li {
  margin: 0;
}

.books-sidebar .shop-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 100%;
  padding: 14px 8px 12px;
  border: 1px solid #ede8e1;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: #1c1917;
  text-align: center;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.books-sidebar .shop-cat-card:hover {
  border-color: #d6d0c8;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.06);
  transform: translateY(-1px);
}

.books-sidebar .shop-cat-card.is-active {
  border-color: #1e5bb8;
  box-shadow: 0 0 0 1px rgba(30, 91, 184, 0.12);
}

.books-sidebar .shop-cat-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f0fa;
}

.books-sidebar .shop-cat-grid li:nth-child(3n + 2) .shop-cat-card__icon {
  background: #fce8ec;
}

.books-sidebar .shop-cat-grid li:nth-child(3n + 3) .shop-cat-card__icon {
  background: #e8f5e9;
}

.books-sidebar .shop-cat-card__icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.books-sidebar .shop-cat-card__name {
  font-family: Arial, Georgia, "Times New Roman", serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1c1917;
}

.books-sidebar .shop-cat-card.is-active .shop-cat-card__name {
  color: #1e5bb8;
}

.books-sidebar .shop-cat-card__count {
  font-size: 0.6875rem;
  line-height: 1.3;
  color: #a8a29e;
  font-weight: 400;
}

/* Product tag rows */
.books-sidebar .shop-tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.books-sidebar .shop-tag-list li {
  margin: 0;
}

.books-sidebar .shop-tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ede8e1;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: #1c1917;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.books-sidebar .shop-tag-row:hover {
  border-color: #d6d0c8;
  background: #faf9f6;
}

.books-sidebar .shop-tag-row.is-active {
  border-color: #1e5bb8;
  background: #f5f9ff;
}

.books-sidebar .shop-tag-row__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e3f2fd;
  color: #1e5bb8;
}

.books-sidebar .shop-tag-row__icon svg {
  display: block;
}

.books-sidebar .shop-tag-row__label {
  flex: 1;
  min-width: 0;
  font-family: Arial, Georgia, "Times New Roman", serif;
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: left;
}

.books-sidebar .shop-tag-row.is-active .shop-tag-row__label {
  color: #1e5bb8;
}

.books-sidebar .shop-tag-row__chevron {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #a8a29e;
}

.books-sidebar .shop-tag-row__chevron svg {
  display: block;
}

@media (max-width: 1100px) {
  .books-sidebar .shop-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .books-sidebar .shop-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
