:root {
  --sf-bg: #faf7f2;
  --sf-surface: #ffffff;
  --sf-surface-alt: #f1eadf;
  --sf-text: #1f2937;
  --sf-text-muted: #6b7280;
  --sf-border: #ddd3c5;
  --sf-primary: #2f5d50;
  --sf-secondary: #8c6a43;
  --sf-accent: #c08457;
  --sf-success: #166534;
  --sf-danger: #b91c1c;
  --sf-radius-btn: 10px;
  --sf-radius-card: 18px;
  --sf-shadow-card: 0 18px 50px rgba(47, 93, 80, 0.08);
  --sf-font-heading: 'Cormorant Garamond', serif;
  --sf-font-body: 'Noto Sans', 'Noto Sans Myanmar', sans-serif;
}

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sf-bg);
  color: var(--sf-text);
  font-family: var(--sf-font-body);
}

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

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 0.95), 0 0 0 0.25rem rgba(47, 93, 80, 0.28);
}

.announcement-bar {
  background: linear-gradient(135deg, #2f5d50 0%, #8c6a43 100%);
  color: #f9f7f3;
  font-size: 0.82rem;
  padding: 0.4rem 0;
}

.announcement-link {
  color: #fff3df;
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.storefront-nav {
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(221, 211, 197, 0.85);
  padding: 0.45rem 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--sf-text);
}

.brand-mark strong,
.site-footer h3,
.site-footer h4 {
  font-family: var(--sf-font-heading);
}

.brand-mark strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

.brand-mark small {
  color: var(--sf-text-muted);
  display: block;
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.brand-icon {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-secondary) 100%);
  color: #fffaf3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--sf-shadow-card);
}

.nav-links {
  gap: 0.4rem;
}

.nav-links .nav-link {
  color: var(--sf-text-muted);
  font-weight: 600;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
}

.nav-links .nav-link:hover,
.nav-links .nav-link:focus {
  color: var(--sf-primary);
  background: rgba(47, 93, 80, 0.08);
}

.nav-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 0;
}

.nav-tools__session {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.nav-tools .btn {
  white-space: nowrap;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--sf-border);
  border-radius: 999px;
  background: var(--sf-surface);
}

.lang-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--sf-muted, #6b7280);
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}

.lang-link.is-active,
.lang-link:hover,
.lang-link:focus {
  color: var(--sf-primary);
  background: rgba(47, 93, 80, 0.1);
}

.cms-body p + p {
  margin-top: 1rem;
}

.icon-button {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sf-surface);
  border: 1px solid var(--sf-border);
  color: var(--sf-primary);
  position: relative;
  text-decoration: none;
}

.icon-button:hover,
.icon-button:focus {
  background: var(--sf-surface-alt);
}

.header-search {
  position: relative;
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 28rem;
  margin: 0 0.85rem 0 0.5rem;
}

.header-search__input {
  width: 100%;
  height: 2.75rem;
  border: 1px solid var(--sf-border);
  border-radius: 999px;
  background: var(--sf-surface);
  color: var(--sf-text);
  font-size: 0.9rem;
  padding: 0 2.85rem 0 1.05rem;
  outline: none;
}

.header-search__input::placeholder {
  color: #9ca3af;
}

.header-search__input:focus {
  border-color: var(--sf-primary);
  box-shadow: 0 0 0 0.2rem rgba(47, 93, 80, 0.15);
}

.header-search__submit {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.3rem;
  height: 2.3rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sf-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-search__submit:hover,
.header-search__submit:focus {
  background: rgba(47, 93, 80, 0.1);
}

.cart-button .cart-count-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.25rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #b4532a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  border: 2px solid var(--sf-surface);
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 1080;
  transform: translateX(-50%) translateY(0.75rem);
  max-width: min(92vw, 22rem);
  padding: 0.75rem 1.1rem;
  border-radius: 0.65rem;
  background: #24362f;
  color: #f7f2ea;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(24, 36, 30, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.btn-brand {
  background: var(--sf-primary);
  border-color: var(--sf-primary);
  color: #f8f5ef;
  border-radius: var(--sf-radius-btn);
  font-weight: 700;
  padding: 0.75rem 1.15rem;
}

.btn-brand:hover,
.btn-brand:focus {
  background: #25493f;
  border-color: #25493f;
  color: #fff;
}

.auth-tabs .nav-link {
  color: var(--sf-muted, #6c757d);
  font-weight: 600;
  border-bottom-width: 2px;
}

.auth-tabs .nav-link.active {
  color: var(--sf-primary);
  border-bottom-color: var(--sf-primary);
}

.auth-tabs .nav-link.disabled {
  color: #adb5bd;
  cursor: not-allowed;
  opacity: 0.65;
  pointer-events: none;
}

.page-shell {
  min-height: calc(100vh - 215px);
}

.page-content {
  padding-bottom: 2rem;
}

#global-back-nav {
  display: flex;
  align-items: center;
}

.is-home #global-back-nav {
  display: none;
}

.js-history-back {
  border-radius: 999px;
}

.site-footer {
  background: #1f2d29;
  color: #e9e2d8;
  padding: 3rem 0 1.2rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.6fr 1fr 1fr;
}

.site-footer h3 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.site-footer h4 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: #f2ebdf;
  display: block;
  margin-bottom: 0.45rem;
}

.footer-meta {
  border-top: 1px solid rgba(233, 226, 216, 0.14);
  margin-top: 1.5rem;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #c7bbab;
  font-size: 0.92rem;
}

.hero-surface,
.content-card {
  background: var(--sf-surface);
  border: 1px solid rgba(221, 211, 197, 0.9);
  border-radius: var(--sf-radius-card);
  box-shadow: var(--sf-shadow-card);
}

.eyebrow {
  color: var(--sf-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--sf-font-heading);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.15;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

.section-copy {
  color: var(--sf-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.book-detail__description p {
  margin-bottom: 0.75rem;
}

.book-detail__description p:last-child {
  margin-bottom: 0;
}

.row.product-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  margin-left: 0;
  margin-right: 0;
}

@media (min-width: 768px) {
  .row.product-grid,
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1200px) {
  .row.product-grid,
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 14px;
  }
}

.product-grid > [class*="col-"] {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.catalog-filter-bar {
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
}

.catalog-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.catalog-filter-keyword {
  flex: 1 1 180px;
  min-width: 160px;
}

.catalog-filter-form .form-select {
  flex: 0 1 132px;
  width: auto;
}

.catalog-filter-price {
  width: 72px;
  flex: 0 0 72px;
}

.catalog-filter-stock {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.catalog-filter-apply {
  padding: 0.35rem 0.9rem;
}

.writers-page {
  max-width: 720px;
  margin: 0 auto;
}

.writers-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1.75rem;
}

.writers-search__input {
  width: 100%;
  border: 1.5px solid #1f2937;
  border-radius: 999px;
  background: #fff;
  color: var(--sf-text);
  font-size: 1rem;
  padding: 0.95rem 3.25rem 0.95rem 1.35rem;
  outline: none;
}

.writers-search__input::placeholder {
  color: #9ca3af;
}

.writers-search__input:focus {
  border-color: var(--sf-primary);
  box-shadow: 0 0 0 0.2rem rgba(47, 93, 80, 0.15);
}

.writers-search__submit {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.writers-page__title {
  text-align: center;
  font-family: var(--sf-font-body);
  font-size: 1.35rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 1.25rem;
}

.writers-list {
  overflow: hidden;
}

.writers-list__items {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  max-height: min(62vh, 560px);
  overflow-y: auto;
}

.writers-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.35rem;
  color: var(--sf-text);
  border-bottom: 1px solid rgba(221, 211, 197, 0.55);
  transition: background-color 0.15s ease;
}

.writers-list__items li:last-child .writers-list__row {
  border-bottom: 0;
}

.writers-list__row:hover,
.writers-list__row:focus {
  background: rgba(47, 93, 80, 0.04);
  color: var(--sf-text);
}

.writers-list__name {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  min-width: 0;
}

.writers-list__count {
  flex-shrink: 0;
  min-width: 2rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.writers-list__empty {
  padding: 2rem 1.35rem;
  text-align: center;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  height: 100%;
  background: #ffffff;
  border: 1px solid #dce3ec;
  border-radius: 14px;
  padding: 10px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 27, 43, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(15, 27, 43, 0.1);
}

.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: #f3f7fb;
  overflow: hidden;
  border-radius: 10px;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.product-card__media img.is-placeholder,
.product-main-image.is-placeholder,
img.is-placeholder {
  object-fit: contain;
  background: #f3eee6;
  padding: 12%;
}

.error-page {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0;
  flex: 1;
}

.product-card__author {
  color: #c0392b;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__title {
  font-family: var(--sf-font-body);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--sf-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
}

html[lang="my"] .product-card__title {
  font-size: 0.78rem;
  line-height: 1.42;
}

html[lang="my"] .product-card__author {
  font-size: 0.64rem;
}

.product-card__author a {
  color: inherit;
  text-decoration: none;
}

.product-card__author a:hover,
.product-card__author a:focus {
  color: var(--sf-primary);
  text-decoration: underline;
}

.book-detail__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (min-width: 768px) {
  .book-detail__title {
    font-size: 1.4rem;
  }
}

.book-detail__authors {
  color: #c0392b;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}

.book-detail__authors a {
  color: inherit;
  text-decoration: none;
}

.book-detail__authors a:hover,
.book-detail__authors a:focus {
  color: var(--sf-primary);
  text-decoration: underline;
}

.book-detail__category {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--sf-border, #e5e7eb);
  background: #f8f5f0;
  color: var(--sf-text);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.book-detail__category:hover,
.book-detail__category:focus {
  color: var(--sf-primary);
  border-color: var(--sf-primary);
}

.product-card__title a {
  color: inherit;
}

.product-card__title a:hover,
.product-card__title a:focus {
  color: var(--sf-primary);
}

.product-card__price {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--sf-text);
  margin: 0.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem;
}

.product-card__price-sale {
  color: #b91c1c;
}

.product-card__price-compare {
  color: var(--sf-text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: line-through;
}

.product-card__rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.1rem;
}

.product-card__stars {
  color: #f0b429;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.product-card__reviews {
  color: var(--sf-text-muted);
  font-size: 0.62rem;
  white-space: nowrap;
}

.product-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 0.45rem;
}

.product-card__badge {
  display: none;
}

.product-card__cart {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 28px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--sf-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.product-card__cart:hover,
.product-card__cart:focus {
  background: #254a40;
  color: #fff;
}

.product-card__cart:disabled,
.product-card__cart.is-disabled {
  opacity: 1;
  cursor: not-allowed;
  background: #9aa3af;
  color: #fff;
}

.cart-item-title-link {
  color: inherit;
  text-decoration: none;
}

.cart-item-title-link:hover,
.cart-item-title-link:focus {
  color: var(--sf-primary);
  text-decoration: underline;
}

.cart-item-link {
  display: block;
  flex-shrink: 0;
}

.product-card__wish-form {
  margin: 0;
}

.product-card__wish {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dce3ec;
  border-radius: 999px;
  background: #fff;
  color: var(--sf-text);
}

.product-card__wish:hover,
.product-card__wish:focus {
  border-color: var(--sf-primary);
  color: #c0392b;
  background: #fff;
}

.product-main-image {
  cursor: zoom-in;
}

.gallery-thumb.active {
  border-color: var(--sf-primary) !important;
  box-shadow: 0 0 0 2px rgba(47, 93, 80, 0.2);
}

.cart-item-thumb {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--sf-border);
  background: var(--sf-surface-alt);
  flex-shrink: 0;
}

.payment-panel {
  border: 1px solid rgba(221, 211, 197, 0.9);
  border-radius: 12px;
  background: #fcfaf5;
  padding: 1rem;
}

#payment-slip-input {
  background: #fff;
}

@media (min-width: 992px) {
  .storefront-nav.navbar-expand-lg {
    flex-wrap: wrap;
  }

  .storefront-nav .container {
    display: grid;
    grid-template-columns: auto minmax(10rem, 1fr) minmax(0, max-content);
    grid-template-areas:
      "brand search tools"
      "links links links";
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.2rem;
  }

  .storefront-nav .navbar-brand {
    grid-area: brand;
    margin-right: 0;
  }

  .storefront-nav .header-search {
    grid-area: search;
    max-width: none;
    width: 100%;
    margin: 0;
  }

  .storefront-nav .navbar-collapse {
    display: contents !important;
  }

  .storefront-nav .nav-links {
    grid-area: links;
    justify-content: center;
    margin: 0 !important;
  }

  .storefront-nav .nav-links .nav-link {
    padding: 0.4rem 0.8rem;
  }

  .storefront-nav .nav-tools {
    grid-area: tools;
  }

  .storefront-nav .nav-tools .btn {
    --bs-btn-padding-y: 0.32rem;
    --bs-btn-padding-x: 0.65rem;
    --bs-btn-font-size: 0.8rem;
  }
}

@media (max-width: 991.98px) {
  .storefront-nav {
    padding: 0.85rem 0;
  }

  .nav-links {
    margin: 1rem 0;
  }

  .nav-tools {
    padding-top: 0.5rem;
  }

  .storefront-nav .navbar-brand {
    order: 1;
  }

  .storefront-nav .navbar-toggler {
    order: 2;
  }

  .header-search {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
    margin: 0.65rem 0 0;
  }

  .storefront-nav .navbar-collapse {
    order: 4;
  }
}

@media (max-width: 767.98px) {
  #global-back-nav {
    padding-top: 0.5rem !important;
  }

  .announcement-bar {
    font-size: 0.82rem;
  }

  #payment-slip-input {
    max-width: 100% !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    flex-direction: column;
  }
}

.category-directory {
  max-width: 820px;
  margin: 0 auto;
}

.category-directory .writers-search {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.category-directory-intro h1 {
  font-family: var(--sf-font-heading);
  color: var(--sf-primary);
  font-weight: 700;
}

.category-group-list {
  display: grid;
  gap: 1rem;
}

.category-group {
  background: var(--sf-surface);
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius-card);
  box-shadow: var(--sf-shadow-card);
  overflow: hidden;
}

.category-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.2rem;
  background: var(--sf-primary);
  color: #f9f7f3;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.category-group-header::-webkit-details-marker,
.category-group-header::marker {
  display: none;
}

.category-group-toggle {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(249, 247, 243, 0.16);
  flex-shrink: 0;
}

.category-group[open] .category-group-icon-closed,
.category-group:not([open]) .category-group-icon-open {
  display: none;
}

.category-group-items {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  background: var(--sf-surface);
  max-height: min(62vh, 560px);
  overflow-y: auto;
}

.category-group-items a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  color: var(--sf-primary);
  border-bottom: 1px solid rgba(221, 211, 197, 0.55);
  font-weight: 500;
}

.category-group-items li:last-child a {
  border-bottom: 0;
}

.category-group-items a:hover,
.category-group-items a:focus {
  background: var(--sf-surface-alt);
  color: #254a40;
}

.category-count {
  flex-shrink: 0;
  min-width: 2rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--sf-surface-alt);
  color: var(--sf-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.category-listing-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--sf-text-muted);
  margin-bottom: 0.35rem;
}

.category-listing-crumb a {
  color: var(--sf-primary);
  font-weight: 600;
}

.category-listing-head h1 {
  font-family: var(--sf-font-heading);
  color: var(--sf-primary);
}

.catalog-facet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 7.25rem;
  overflow-y: auto;
  margin: 0 0 0.85rem;
  padding-bottom: 0.1rem;
}

.catalog-facet-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sf-border);
  border-radius: 999px;
  background: #fff;
  color: var(--sf-text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.35rem 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}

.catalog-facet-chip:hover {
  border-color: var(--sf-primary);
  color: var(--sf-primary);
}

.catalog-facet-chip.is-active {
  background: var(--sf-primary);
  border-color: var(--sf-primary);
  color: #fff;
}

.catalog-facet-chip.is-active:hover {
  color: #fff;
  filter: brightness(1.05);
}

.category-listing-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--sf-surface);
  border: 1px solid var(--sf-border);
  border-radius: 14px;
}

.category-listing-filters .catalog-filter-keyword {
  flex: 1 1 180px;
}

.category-listing-stock {
  flex: 0 1 150px;
  width: auto;
}

.catalog-filter-bar {
  overflow: visible;
}

.sf-combobox {
  position: relative;
  flex: 1 1 170px;
  min-width: 150px;
}

.content-card .d-grid > .sf-combobox,
.offcanvas .sf-combobox {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.sf-combobox-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.3rem 0;
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid var(--sf-border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(47, 93, 80, 0.12);
}

.sf-combobox-list li {
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  color: var(--sf-text);
}

.sf-combobox-list li:hover,
.sf-combobox-list li.is-active {
  background: var(--sf-surface-alt);
}

.sf-combobox-list li.is-selected {
  color: var(--sf-primary);
  font-weight: 600;
}

.sf-combobox-list li.is-empty {
  color: var(--sf-text-muted);
  cursor: default;
}

.sf-rail-title {
  font-family: var(--sf-font-heading);
  color: var(--sf-primary);
}

.sf-rail-all {
  border-radius: 8px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
}

.sf-rail {
  position: relative;
}

.sf-rail-track {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.25rem 2.4rem 0.75rem;
}

.sf-rail-track::-webkit-scrollbar {
  display: none;
}

.sf-rail-card {
  position: relative;
  flex: 0 0 158px;
  width: 158px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  scroll-snap-align: start;
  box-shadow: 0 10px 24px rgba(47, 93, 80, 0.16);
  background:
    linear-gradient(180deg, rgba(47, 93, 80, 0.18), rgba(47, 93, 80, 0.72)),
    var(--sf-primary);
}

.sf-rail-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-rail-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 28, 24, 0.28), rgba(20, 28, 24, 0.58));
}

.sf-rail-card-label {
  position: absolute;
  z-index: 1;
  left: 0.55rem;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  max-height: calc(100% - 1.1rem);
  overflow: hidden;
  padding: 0.45rem 0.55rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.3;
  color: #fff;
  background: rgba(47, 93, 80, 0.92);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(20, 28, 24, 0.28);
}

.sf-rail-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--sf-primary);
  box-shadow: 0 6px 16px rgba(47, 93, 80, 0.18);
  transform: translateY(-70%);
  cursor: pointer;
}

.sf-rail-nav.is-prev {
  left: 0;
}

.sf-rail-nav.is-next {
  right: 0;
}

.sf-rail-nav:hover {
  background: var(--sf-surface);
}

@media (max-width: 575.98px) {
  .sf-rail-card {
    flex-basis: 132px;
    width: 132px;
  }

  .sf-rail-track {
    padding-inline: 1.8rem;
  }
}

.sf-product-rail-item {
  flex: 0 0 176px;
  width: 176px;
  scroll-snap-align: start;
}

.sf-product-rail-item .product-card {
  height: 100%;
}

@media (max-width: 767.98px) {
  .sf-product-rail .sf-rail-track {
    padding-inline: 0;
    gap: 0.55rem;
  }

  .sf-product-rail-item {
    flex: 0 0 calc((100% - 0.55rem) / 2);
    width: calc((100% - 0.55rem) / 2);
  }

  .sf-product-rail-item:nth-child(odd) {
    scroll-snap-align: start;
  }

  .sf-product-rail-item:nth-child(even) {
    scroll-snap-align: none;
  }

  .sf-product-rail .sf-rail-nav {
    width: 32px;
    height: 32px;
  }
}
