/* =============================================================================
   UnikBooks — Brand stylesheet
   Editorial, earthy, calm. Layered on top of Bootstrap 5.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Design tokens
   ----------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --ub-primary: #2d6a4f; /* Forest green */
  --ub-primary-dark: #1b4332;
  --ub-primary-light: #52b788; /* Sage */
  --ub-accent: #95d5b2;
  --ub-cream: #f8f4ef;
  --ub-cream-200: #efe7d9;
  --ub-paper: #fffdf9;
  --ub-ink: #1a1a1a;
  --ub-ink-soft: #4a4a4a;
  --ub-ink-muted: #7a7a7a;
  --ub-line: #e4dcc9;

  /* Semantic */
  --ub-success: #2d6a4f;
  --ub-warning: #d4a24c;
  --ub-danger: #b23a48;
  --ub-info: #5288a8;

  /* Typography */
  --ub-font-serif: "DM Serif Display", "Cormorant Garamond", Georgia, serif;
  --ub-font-sans:
    "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Radii & shadows */
  --ub-radius-sm: 6px;
  --ub-radius: 12px;
  --ub-radius-lg: 20px;
  --ub-shadow-sm:
    0 1px 2px rgba(26, 26, 26, 0.04), 0 1px 1px rgba(26, 26, 26, 0.03);
  --ub-shadow: 0 8px 24px -8px rgba(26, 26, 26, 0.12);
  --ub-shadow-lg: 0 24px 48px -16px rgba(26, 26, 26, 0.18);

  /* Layout */
  --ub-header-h: 72px;
  --ub-container-max: 1240px;

  /* Bootstrap overrides */
  --bs-primary: var(--ub-primary);
  --bs-primary-rgb: 45, 106, 79;
  --bs-body-bg: var(--ub-cream);
  --bs-body-color: var(--ub-ink);
  --bs-body-font-family: var(--ub-font-sans);
  --bs-border-color: var(--ub-line);
}

/* -----------------------------------------------------------------------------
   2. Base
   ----------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ub-cream);
  color: var(--ub-ink);
  font-family: var(--ub-font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.ub-brand,
.ub-display,
.footer-brand {
  font-family: var(--ub-font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ub-ink);
  line-height: 1.15;
}

h1,
.h1 {
  font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem);
}
h2,
.h2 {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
}
h3,
.h3 {
  font-size: 1.5rem;
}
h4,
.h4 {
  font-size: 1.25rem;
}

a {
  color: var(--ub-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover,
a:focus {
  color: var(--ub-primary-dark);
}

::selection {
  background: var(--ub-accent);
  color: var(--ub-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}
img[data-src] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img.is-loaded {
  opacity: 1;
}

.container,
.container-fluid {
  max-width: var(--ub-container-max);
}

/* Visually-hidden helper that still focuses */
.sr-only,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -----------------------------------------------------------------------------
   3. Announcement bar
   ----------------------------------------------------------------------------- */
.announcement-bar {
  background: var(--ub-primary-dark);
  color: var(--ub-cream);
  font-size: 0.875rem;
  text-align: center;
  padding: 0.6rem 3rem;
  transition:
    max-height 0.2s ease,
    opacity 0.2s ease;
}
.announcement-bar a {
  color: var(--ub-accent);
  text-decoration: underline;
}
.announcement-bar .btn-close {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  padding: 0.5rem;
  opacity: 0.7;
}
.announcement-bar .btn-close:hover {
  opacity: 1;
}
.announcement-bar.is-dismissing {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* -----------------------------------------------------------------------------
   4. Site header & navigation
   ----------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(248, 244, 239, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--ub-line);
  box-shadow: var(--ub-shadow-sm);
  background: rgba(255, 253, 249, 0.96);
}

.site-header .navbar {
  min-height: var(--ub-header-h);
  padding: 0.75rem 1rem;
}

.ub-brand {
  font-family: var(--ub-font-serif);
  font-size: 1.6rem;
  color: var(--ub-primary-dark) !important;
  letter-spacing: -0.015em;
}

.site-header .navbar-nav .nav-link {
  color: var(--ub-ink);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  position: relative;
  transition: color 0.15s ease;
}
.site-header .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.25rem;
  height: 1px;
  background: var(--ub-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}
.site-header .navbar-nav .nav-link:hover,
.site-header .navbar-nav .nav-link.active {
  color: var(--ub-primary-dark);
}
.site-header .navbar-nav .nav-link:hover::after,
.site-header .navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: var(--ub-ink);
  border: 1px solid transparent;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.icon-btn:hover,
.icon-btn:focus {
  background: var(--ub-cream-200);
  color: var(--ub-primary-dark);
}

.search-bar {
  border-top: 1px solid var(--ub-line);
  background: var(--ub-paper);
  padding: 0.75rem 0;
}
.search-bar .form-control {
  font-size: 1.1rem;
}
.search-bar .form-control:focus {
  box-shadow: none;
}

/* Restore Bootstrap caret on the Categories dropdown toggle
   (the nav-link::after rule above overrides it with the underline animation) */
.site-header .nav-item.dropdown > .dropdown-toggle::after {
  display: inline-block;
  width: auto;
  height: auto;
  background: none;
  transform: none;
  transition: none;
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-left: 0.3em solid transparent;
  vertical-align: 0.15em;
  margin-left: 0.3em;
  content: "";
  position: static;
}

/* Desktop nav: open categories dropdown on hover */
@media (min-width: 992px) {
  .site-header .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
  }
}

/* Dropdown */
.dropdown-menu {
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  box-shadow: var(--ub-shadow);
  padding: 0.5rem;
  background: var(--ub-paper);
}
.dropdown-item {
  border-radius: var(--ub-radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--ub-ink);
}
.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--ub-cream-200);
  color: var(--ub-primary-dark);
}

/* Off-canvas mobile menu */
.ub-offcanvas {
  background: var(--ub-paper);
}
.ub-offcanvas .nav-link {
  color: var(--ub-ink);
  font-weight: 500;
  border-bottom: 1px solid var(--ub-line);
}
.ub-offcanvas .nav-link:hover {
  color: var(--ub-primary-dark);
}

/* -----------------------------------------------------------------------------
   5. Buttons
   ----------------------------------------------------------------------------- */
.btn {
  font-family: var(--ub-font-sans);
  font-weight: 500;
  border-radius: var(--ub-radius-sm);
  padding: 0.625rem 1.25rem;
  transition:
    transform 0.05s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  --bs-btn-bg: var(--ub-primary);
  --bs-btn-border-color: var(--ub-primary);
  --bs-btn-hover-bg: var(--ub-primary-dark);
  --bs-btn-hover-border-color: var(--ub-primary-dark);
  --bs-btn-active-bg: var(--ub-primary-dark);
  --bs-btn-active-border-color: var(--ub-primary-dark);
  color: var(--ub-cream);
}
.btn-outline-primary {
  --bs-btn-color: var(--ub-primary);
  --bs-btn-border-color: var(--ub-primary);
  --bs-btn-hover-bg: var(--ub-primary);
  --bs-btn-hover-border-color: var(--ub-primary);
  --bs-btn-hover-color: var(--ub-cream);
}
.btn-ghost {
  background: transparent;
  color: var(--ub-primary-dark);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--ub-cream-200);
  color: var(--ub-primary-dark);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

/* -----------------------------------------------------------------------------
   6. Forms
   ----------------------------------------------------------------------------- */
.form-control,
.form-select {
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius-sm);
  background: var(--ub-paper);
  padding: 0.65rem 0.9rem;
  color: var(--ub-ink);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--ub-primary-light);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.18);
}
.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ub-ink-soft);
}
.form-text {
  color: var(--ub-ink-muted);
}

/* -----------------------------------------------------------------------------
   7. Cards & product cards
   ----------------------------------------------------------------------------- */
.card {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  overflow: hidden;
}

.product-card {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ub-shadow);
  border-color: transparent;
}
.product-card__media {
  position: relative;
  aspect-ratio: 5 / 8;
  background: var(--ub-cream-200);
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card__media img {
  transform: scale(1.04);
}
.product-card__body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.product-card__category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ub-ink-muted);
}
.product-card__title {
  font-family: var(--ub-font-serif);
  font-size: 1.1rem;
  margin: 0;
  color: var(--ub-ink);
  line-height: 1.3;
}
.product-card__price {
  margin-top: auto;
  font-weight: 600;
  color: var(--ub-primary-dark);
}
.product-card__price del {
  color: var(--ub-ink-muted);
  font-weight: 400;
  margin-right: 0.4rem;
}

/* Badges */
.ub-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  background: var(--ub-cream-200);
  color: var(--ub-ink-soft);
}
.ub-badge--new {
  background: var(--ub-primary);
  color: var(--ub-cream);
}
.ub-badge--sale {
  background: var(--ub-danger);
  color: #fff;
}
.ub-badge--bestseller {
  background: var(--ub-warning);
  color: var(--ub-ink);
}
.product-card__media .ub-badge,
.product-gallery__main .ub-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

/* -----------------------------------------------------------------------------
   8. Hero & section blocks
   ----------------------------------------------------------------------------- */
.site-main {
  min-height: 50vh;
}

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: linear-gradient(180deg, var(--ub-cream) 0%, var(--ub-paper) 100%);
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ub-primary);
  margin-bottom: 0.75rem;
}
.hero__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
}
.hero__title em {
  font-style: italic;
  color: var(--ub-primary);
}
.hero__lead {
  font-size: 1.15rem;
  color: var(--ub-ink-soft);
  max-width: 36rem;
  margin-bottom: 2rem;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.section--cream {
  background: var(--ub-cream-200);
}
.section--paper {
  background: var(--ub-paper);
}

.section-heading {
  margin-bottom: 2.5rem;
}
.section-heading__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ub-primary);
  margin-bottom: 0.5rem;
}
.section-heading__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.8rem, 2.5vw + 1rem, 2.75rem);
  margin: 0;
}
.section-heading__lead {
  color: var(--ub-ink-soft);
  max-width: 38rem;
  margin-top: 0.75rem;
}

/* -----------------------------------------------------------------------------
   9. Category & feature tiles
   ----------------------------------------------------------------------------- */
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem 1rem;
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  text-align: center;
  color: var(--ub-ink);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}
.category-tile:hover {
  transform: translateY(-2px);
  border-color: var(--ub-primary-light);
  background: var(--ub-cream);
  color: var(--ub-primary-dark);
}
.category-tile__icon {
  font-size: 1.75rem;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ub-cream-200);
}
.category-tile__name {
  font-weight: 500;
  font-size: 0.95rem;
}

/* -----------------------------------------------------------------------------
   10. Footer
   ----------------------------------------------------------------------------- */
.site-footer {
  background: var(--ub-primary-dark);
  color: var(--ub-cream);
  padding: clamp(3rem, 6vw, 5rem) 0 1.5rem;
  margin-top: 5rem;
}
.site-footer h6 {
  color: var(--ub-cream);
  font-family: var(--ub-font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.site-footer .footer-brand {
  font-family: var(--ub-font-serif);
  font-size: 1.75rem;
  color: var(--ub-cream);
}
.site-footer p,
.site-footer li {
  color: rgba(248, 244, 239, 0.78);
}
.site-footer a {
  color: rgba(248, 244, 239, 0.85);
  transition: color 0.15s ease;
}
.site-footer a:hover {
  color: var(--ub-accent);
}
.site-footer li {
  margin-bottom: 0.4rem;
}
.site-footer .icon-btn {
  color: var(--ub-cream);
  border-color: rgba(248, 244, 239, 0.25);
}
.site-footer .icon-btn:hover {
  background: rgba(248, 244, 239, 0.1);
  color: var(--ub-accent);
  border-color: var(--ub-accent);
}
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(248, 244, 239, 0.12);
  font-size: 0.85rem;
  color: rgba(248, 244, 239, 0.6);
}

.newsletter-form {
  display: flex;
  background: rgba(248, 244, 239, 0.08);
  border: 1px solid rgba(248, 244, 239, 0.18);
  border-radius: var(--ub-radius-sm);
  overflow: hidden;
}
.newsletter-form input[type="email"] {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ub-cream);
  padding: 0.65rem 0.9rem;
  font: inherit;
}
.newsletter-form input[type="email"]::placeholder {
  color: rgba(248, 244, 239, 0.5);
}
.newsletter-form input[type="email"]:focus {
  outline: none;
  background: rgba(248, 244, 239, 0.05);
}
.newsletter-form .btn {
  border-radius: 0;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.newsletter-status.is-success {
  color: var(--ub-accent);
}
.newsletter-status.is-error {
  color: #fda4a4;
}

/* -----------------------------------------------------------------------------
   11. Flash messages
   ----------------------------------------------------------------------------- */
.flash-stack {
  position: fixed;
  top: calc(var(--ub-header-h) + 1rem);
  right: 1rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}
.flash {
  pointer-events: auto;
  padding: 0.85rem 1rem;
  border-radius: var(--ub-radius-sm);
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  box-shadow: var(--ub-shadow);
  font-size: 0.92rem;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.flash--success {
  border-left: 3px solid var(--ub-success);
}
.flash--error {
  border-left: 3px solid var(--ub-danger);
}
.flash--info {
  border-left: 3px solid var(--ub-info);
}
.flash.is-leaving {
  opacity: 0;
  transform: translateX(20px);
}

/* -----------------------------------------------------------------------------
   12. Breadcrumbs, pagination, misc
   ----------------------------------------------------------------------------- */
.breadcrumb {
  background: transparent;
  padding: 0;
  font-size: 0.875rem;
  color: var(--ub-ink-muted);
}
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--ub-ink-muted);
}
.breadcrumb-item a {
  color: var(--ub-ink-soft);
}

.page-link {
  color: var(--ub-ink-soft);
  border-color: var(--ub-line);
  background: var(--ub-paper);
}
.page-item.active .page-link {
  background: var(--ub-primary);
  border-color: var(--ub-primary);
  color: var(--ub-cream);
}

hr {
  color: var(--ub-line);
  opacity: 1;
}

/* -----------------------------------------------------------------------------
   13. Utility classes
   ----------------------------------------------------------------------------- */
.bg-paper {
  background-color: var(--ub-paper) !important;
}
.bg-cream {
  background-color: var(--ub-cream) !important;
}
.bg-cream-200 {
  background-color: var(--ub-cream-200) !important;
}
.bg-primary {
  background-color: var(--ub-primary) !important;
  color: var(--ub-cream) !important;
}

.text-primary {
  color: var(--ub-primary) !important;
}
.text-primary-dark {
  color: var(--ub-primary-dark) !important;
}
.text-ink {
  color: var(--ub-ink) !important;
}
.text-ink-soft {
  color: var(--ub-ink-soft) !important;
}
.text-ink-muted,
.text-muted {
  color: var(--ub-ink-muted) !important;
}

.rounded-ub {
  border-radius: var(--ub-radius) !important;
}
.rounded-ub-lg {
  border-radius: var(--ub-radius-lg) !important;
}
.shadow-ub {
  box-shadow: var(--ub-shadow) !important;
}
.shadow-ub-lg {
  box-shadow: var(--ub-shadow-lg) !important;
}

.divider {
  border: 0;
  border-top: 1px solid var(--ub-line);
  margin: 2.5rem 0;
}

/* -----------------------------------------------------------------------------
   14. Responsive tweaks
   ----------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .site-header .navbar {
    padding: 0.5rem 0.75rem;
  }
  .site-footer {
    margin-top: 3rem;
  }
}
@media (max-width: 575.98px) {
  .hero {
    padding: 2.5rem 0 3rem;
  }
  .product-card__media {
    aspect-ratio: 5 / 8;
  }
  .flash-stack {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

/* -----------------------------------------------------------------------------
   15. Accessibility & motion
   ----------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--ub-primary-light);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -----------------------------------------------------------------------------
   16. Homepage — hero pattern, category strip, value props, blog cards, CTA
   ----------------------------------------------------------------------------- */

/* ---- Hero carousel -------------------------------------------------------- */
.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 280px;
}
@media (min-width: 992px) {
  .hero-carousel {
    max-width: 340px;
  }
}

/* Fixed aspect-ratio container so the slot never collapses during fade */
.hero-carousel__track {
  position: relative;
  aspect-ratio: 5 / 8;
  border-radius: var(--ub-radius);
}

/* All slides stack in the same cell; only the active one is opaque */
.hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}
.hero-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* The clickable cover link fills the slide */
.hero__featured-cover {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--ub-radius);
  overflow: hidden;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.hero__featured-cover:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.22);
}
.hero__featured-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prev / Next arrow buttons */
.hero-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: var(--ub-ink);
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.hero-carousel__btn:hover {
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  transform: translateY(calc(-50% - 1px));
}
.hero-carousel__btn--prev {
  left: -17px;
}
.hero-carousel__btn--next {
  right: -17px;
}

/* Hero botanical pattern (sits on the right, fades out behind content) */
.hero--home {
  background: linear-gradient(180deg, var(--ub-cream) 0%, var(--ub-paper) 100%);
}
.hero__pattern {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 55%;
  color: var(--ub-primary);
  opacity: 0.55;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 35%,
    #000 100%
  );
}
@media (max-width: 767.98px) {
  .hero__pattern {
    width: 100%;
    opacity: 0.25;
  }
}

/* Category strip — horizontally scrollable on small screens, grid on wide */
.category-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.category-strip > .category-tile {
  scroll-snap-align: start;
}
@media (min-width: 992px) {
  .category-strip {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }
}
@media (min-width: 1200px) {
  .category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Value-prop cards */
.value-prop {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.75rem;
  text-align: left;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.value-prop:hover {
  transform: translateY(-2px);
  box-shadow: var(--ub-shadow);
  border-color: transparent;
}
.value-prop__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ub-cream-200);
  color: var(--ub-primary-dark);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* -----------------------------------------------------------------------------
   Product slider (All Products section on homepage)
   ----------------------------------------------------------------------------- */
.product-slider {
  position: relative;
  overflow: hidden;
}
.product-slider__track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-slider__slide {
  min-width: 100%;
  flex-shrink: 0;
}

.product-slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.product-slider__btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--ub-line);
  background: var(--ub-paper);
  color: var(--ub-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}
.product-slider__btn:hover {
  background: var(--ub-primary);
  border-color: var(--ub-primary);
  color: #fff;
  box-shadow: var(--ub-shadow-sm);
}

.product-slider__dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.product-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--ub-line);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.product-slider__dot.is-active {
  background: var(--ub-primary);
  transform: scale(1.35);
}

/* -----------------------------------------------------------------------------
   All Products grid cards (.ap-card)
   ----------------------------------------------------------------------------- */
.ap-card {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-top: 3px solid var(--ub-primary);
  border-radius: var(--ub-radius);
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-top-color 0.2s ease;
}
.ap-card:hover {
  box-shadow: var(--ub-shadow);
  transform: translateY(-3px);
  border-top-color: var(--ub-primary-light);
}

.ap-card__eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ub-primary);
  margin-bottom: 0.5rem;
}

.ap-card__title {
  display: block;
  font-family: var(--ub-font-serif);
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--ub-ink);
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color 0.15s ease;
}
.ap-card__title:hover {
  color: var(--ub-primary);
}

.ap-card__desc {
  font-size: 0.8rem;
  color: var(--ub-ink-soft);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 1rem;
}

.ap-card__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ub-primary-dark);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.ap-card__price del {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ub-ink-muted);
}

.ap-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ap-card__atc,
.ap-card__buy {
  width: 100%;
  font-size: 0.78rem;
  padding: 0.4rem 0.6rem;
}

@media (max-width: 575px) {
  .ap-card {
    padding: 1rem;
  }
  .ap-card__title {
    font-size: 0.95rem;
  }
}

/* Blog cards */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ub-shadow);
  border-color: transparent;
}
.blog-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--ub-cream-200);
  overflow: hidden;
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card__media img {
  transform: scale(1.04);
}
.blog-card__body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.blog-card__tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ub-primary);
}
.blog-card__title {
  font-family: var(--ub-font-serif);
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0;
}
.blog-card__excerpt {
  color: var(--ub-ink-soft);
  font-size: 0.95rem;
  margin: 0;
}
.blog-card__more {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  color: var(--ub-primary-dark);
}

/* Lead-magnet banner */
.lead-magnet {
  background: linear-gradient(
    135deg,
    var(--ub-primary) 0%,
    var(--ub-primary-dark) 100%
  );
  color: var(--ub-cream);
  padding: clamp(3rem, 6vw, 5rem) 0;
  margin-top: 5rem;
}
.lead-magnet__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ub-accent);
  margin-bottom: 0.5rem;
}
.lead-magnet__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem);
  color: var(--ub-cream);
  margin-bottom: 0.75rem;
}
.lead-magnet__lead {
  color: rgba(248, 244, 239, 0.85);
  font-size: 1.05rem;
}

.lead-magnet__form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  background: rgba(248, 244, 239, 0.08);
  border: 1px solid rgba(248, 244, 239, 0.18);
  border-radius: var(--ub-radius);
  padding: 0.6rem;
}
.lead-magnet__form input {
  border: 0;
  outline: 0;
  background: rgba(248, 244, 239, 0.08);
  color: var(--ub-cream);
  padding: 0.7rem 0.9rem;
  border-radius: var(--ub-radius-sm);
  font: inherit;
}
.lead-magnet__form input::placeholder {
  color: rgba(248, 244, 239, 0.55);
}
.lead-magnet__form input:focus {
  background: rgba(248, 244, 239, 0.14);
}
.lead-magnet__form .btn {
  width: 100%;
}

.btn-cream {
  background: var(--ub-cream);
  color: var(--ub-primary-dark);
  border: 1px solid var(--ub-cream);
}
.btn-cream:hover,
.btn-cream:focus {
  background: var(--ub-paper);
  color: var(--ub-primary-dark);
  border-color: var(--ub-paper);
}

/* Reset margin-top when the lead magnet directly precedes the footer
   (which already adds its own top margin). */
.lead-magnet + .site-footer {
  margin-top: 0;
}

/* -----------------------------------------------------------------------------
   17. Shop listing — header, toolbar, sidebar, grid, pagination
   ----------------------------------------------------------------------------- */
.shop-header {
  background: var(--ub-cream);
}
.shop-title {
  font-family: var(--ub-font-serif);
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  margin: 0 0 0.5rem;
}
.shop-lead {
  color: var(--ub-ink-soft);
  max-width: 42rem;
  margin: 0;
}

.shop-toolbar {
  background: var(--ub-paper);
  border-top: 1px solid var(--ub-line);
  border-bottom: 1px solid var(--ub-line);
  padding: 0.85rem 0;
}
.shop-toolbar__form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.shop-toolbar__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 320px;
  background: var(--ub-cream);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius-sm);
  padding: 0.35rem 0.75rem;
}
.shop-toolbar__search input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ub-ink);
  font: inherit;
  padding: 0.35rem 0;
}
.shop-toolbar__sort {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.shop-toolbar__sort select {
  min-width: 180px;
}

.shop-toolbar__active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  background: var(--ub-cream-200);
  border: 1px solid var(--ub-line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ub-ink-soft);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.filter-chip:hover {
  background: var(--ub-primary);
  color: var(--ub-cream);
}
.filter-chip--clear {
  background: transparent;
  color: var(--ub-primary-dark);
  border-color: var(--ub-primary-light);
  font-weight: 600;
}
.filter-chip--clear:hover {
  background: var(--ub-primary);
  color: var(--ub-cream);
}

/* Sidebar panels */
.filter-panel {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1.25rem;
}
.filter-panel__title {
  font-family: var(--ub-font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ub-ink-soft);
  margin: 0 0 0.85rem;
  padding-left: 0.65rem;
  border-left: 3px solid var(--ub-primary-light);
}
.filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.filter-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem;
  border-radius: var(--ub-radius-sm);
  color: var(--ub-ink-soft);
  font-size: 0.93rem;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.filter-list a:hover {
  background: var(--ub-cream-200);
  color: var(--ub-ink);
}
.filter-list a.is-active {
  background: var(--ub-primary);
  color: var(--ub-cream);
  font-weight: 500;
}
.filter-list__count {
  font-size: 0.75rem;
  color: var(--ub-ink-muted);
  background: var(--ub-cream-200);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}
.filter-list a.is-active .filter-list__count {
  background: rgba(248, 244, 239, 0.18);
  color: var(--ub-cream);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  background: var(--ub-cream-200);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ub-ink-soft);
  font-size: 0.82rem;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.filter-tag:hover {
  background: var(--ub-cream);
  border-color: var(--ub-primary-light);
  color: var(--ub-ink);
}
.filter-tag.is-active {
  background: var(--ub-primary);
  color: var(--ub-cream);
  border-color: var(--ub-primary);
}
.filter-tag__count {
  font-size: 0.72rem;
  opacity: 0.75;
}

/* Empty + pagination */
.shop-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--ub-paper);
  border: 1px dashed var(--ub-line);
  border-radius: var(--ub-radius);
}
.shop-empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ub-cream-200);
  color: var(--ub-primary);
  font-size: 1.6rem;
}
.shop-pagination .page-link {
  padding: 0.45rem 0.85rem;
}

/* -----------------------------------------------------------------------------
   18. Product detail — gallery, buy panel, trust, tabs, FAQ
   ----------------------------------------------------------------------------- */
.product-detail__breadcrumb {
  background: var(--ub-cream);
}
.product-detail {
  background: var(--ub-cream);
}

.product-gallery {
  position: sticky;
  top: calc(var(--ub-header-h) + 1rem);
  width: 100%;
}
.product-gallery__main {
  position: relative;
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  overflow: hidden;
}
.product-gallery__viewport {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}
.product-gallery__track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.32s ease;
  touch-action: pan-y;
  will-change: transform;
}
.product-gallery__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}
.product-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-gallery__placeholder {
  aspect-ratio: 2 / 3;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ub-ink-muted);
  font-size: 4rem;
}
.product-gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}
.product-gallery__thumb {
  flex: 0 0 clamp(64px, 12vw, 86px);
  aspect-ratio: 2 / 3;
  padding: 0;
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-gallery__thumb:hover {
  border-color: var(--ub-primary-light);
}
.product-gallery__thumb.is-active {
  border-color: var(--ub-primary);
  box-shadow: 0 0 0 2px var(--ub-primary-light) inset;
}
.product-gallery__arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--ub-ink);
  font-size: 1.1rem;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid var(--ub-line);
  border-radius: 50%;
  box-shadow: var(--ub-shadow);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}
.product-gallery__arrow:hover {
  color: var(--ub-primary);
  background: var(--ub-paper);
  transform: translateY(-50%) scale(1.05);
}
.product-gallery__arrow--prev {
  left: 0.75rem;
}
.product-gallery__arrow--next {
  right: 0.75rem;
}

/* Buy panel */
.product-info {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.75rem;
}
.product-info__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ub-primary);
  margin-bottom: 0.75rem;
}
.product-info__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.75rem, 2vw + 1rem, 2.4rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
.product-info__lead {
  color: var(--ub-ink-soft);
  font-size: 1.02rem;
  margin: 0 0 1.25rem;
}
.product-info__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  padding: 1rem 0;
  border-top: 1px solid var(--ub-line);
  border-bottom: 1px solid var(--ub-line);
  margin-bottom: 1.25rem;
}
.product-info__price-now {
  font-family: var(--ub-font-serif);
  font-size: 2rem;
  color: var(--ub-primary-dark);
}
.product-info__price-was {
  color: var(--ub-ink-muted);
  text-decoration: line-through;
  font-size: 1.1rem;
}
.product-info__price-save {
  background: var(--ub-accent);
  color: var(--ub-primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.product-info__buy {
  margin-bottom: 1.25rem;
}

.product-trust {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--ub-ink-soft);
}
.product-trust li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.product-trust .bi {
  color: var(--ub-primary);
  font-size: 1.05rem;
}

.product-info__included {
  margin-bottom: 1.25rem;
}
.product-included-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.product-included-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.93rem;
  color: var(--ub-ink-soft);
}
.product-included-list .bi {
  color: var(--ub-primary-light);
  margin-top: 0.1rem;
}

.product-info__specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--ub-line);
  margin: 0 0 1rem;
}
.product-info__specs dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ub-ink-muted);
  margin-bottom: 0.15rem;
}
.product-info__specs dd {
  font-weight: 500;
  margin: 0;
}

.product-info__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

/* Product tabs */
.product-tabs {
  background: var(--ub-paper);
}
.product-tabs__nav {
  border-bottom: 1px solid var(--ub-line);
  gap: 0.25rem;
}
.product-tabs__nav .nav-link {
  color: var(--ub-ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.85rem 1.1rem;
  font-weight: 500;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.product-tabs__nav .nav-link:hover {
  color: var(--ub-primary-dark);
}
.product-tabs__nav .nav-link.active {
  color: var(--ub-primary-dark);
  border-bottom-color: var(--ub-primary);
  background: transparent;
}
.product-tabs__content {
  padding: 1.5rem 0.25rem;
}

.product-prose {
  max-width: 56rem;
  color: var(--ub-ink-soft);
  font-size: 1.02rem;
  line-height: 1.7;
}
.product-prose p {
  margin-bottom: 1rem;
}

.product-learn-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem 1.5rem;
}
.product-learn-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--ub-ink-soft);
  font-size: 0.95rem;
}
.product-learn-list .bi {
  color: var(--ub-primary);
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

/* FAQ accordion */
.product-faq .accordion-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ub-line);
}
.product-faq .accordion-button {
  background: transparent;
  color: var(--ub-ink);
  font-weight: 500;
  font-family: var(--ub-font-sans);
  padding: 1.1rem 0.25rem;
  box-shadow: none;
}
.product-faq .accordion-button:not(.collapsed) {
  background: transparent;
  color: var(--ub-primary-dark);
}
.product-faq .accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}
.product-faq .accordion-body {
  padding: 0 0.25rem 1.25rem;
  color: var(--ub-ink-soft);
  line-height: 1.65;
}

/* Related products */
.related-products {
  background: var(--ub-cream);
}

/* Sticky gallery breaks on small screens — only stick on lg+ */
@media (max-width: 991.98px) {
  .product-gallery {
    position: static;
    max-width: 620px;
    margin-inline: auto;
  }
  .product-info {
    padding: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .product-gallery__arrow {
    width: 2.35rem;
    height: 2.35rem;
  }
  .product-gallery__arrow--prev {
    left: 0.5rem;
  }
  .product-gallery__arrow--next {
    right: 0.5rem;
  }
}

/* -----------------------------------------------------------------------------
   19. Checkout & order confirmation
   ----------------------------------------------------------------------------- */
.checkout-page {
  background: var(--ub-cream);
}
.checkout-page__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.8rem, 2vw + 1rem, 2.5rem);
  margin: 0;
}

.checkout-card {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.75rem;
}
.checkout-card__title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--ub-font-serif);
  font-size: 1.25rem;
  margin: 0 0 1.25rem;
}
.checkout-card__step {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--ub-primary);
  color: var(--ub-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ub-font-sans);
  font-size: 0.85rem;
  font-weight: 600;
}

.checkout-create-fields {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;
  opacity: 0;
}
.checkout-create-fields.is-open {
  max-height: 240px;
  opacity: 1;
}

.checkout-cards {
  display: flex;
  gap: 0.6rem;
  font-size: 1.8rem;
  color: var(--ub-ink-muted);
}

/* Summary (right column) */
.checkout-summary {
  position: sticky;
  top: calc(var(--ub-header-h) + 1rem);
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.5rem;
}
.checkout-summary__title {
  font-family: var(--ub-font-serif);
  font-size: 1.2rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ub-line);
}
.checkout-summary__item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ub-line);
}
.checkout-summary__thumb {
  width: 64px;
  height: 80px;
  background: var(--ub-cream-200);
  border-radius: var(--ub-radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ub-ink-muted);
  font-size: 1.5rem;
}
.checkout-summary__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.checkout-summary__product {
  font-weight: 500;
  line-height: 1.3;
}
.checkout-summary__category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ub-ink-muted);
  margin-top: 0.15rem;
}
.checkout-summary__price {
  font-weight: 600;
}

.checkout-summary__included {
  padding: 1rem 0;
  border-bottom: 1px solid var(--ub-line);
}
.checkout-summary__included h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ub-ink-muted);
  margin: 0 0 0.55rem;
}
.checkout-summary__included ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checkout-summary__included li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ub-ink-soft);
  margin-bottom: 0.35rem;
}
.checkout-summary__included .bi {
  color: var(--ub-primary-light);
  margin-top: 0.15rem;
}

.checkout-summary__totals {
  margin: 1rem 0;
}
.checkout-summary__totals > div {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  color: var(--ub-ink-soft);
}
.checkout-summary__totals dt {
  font-weight: 400;
  margin: 0;
}
.checkout-summary__totals dd {
  margin: 0;
}
.checkout-summary__total {
  padding-top: 0.75rem !important;
  margin-top: 0.25rem;
  border-top: 1px solid var(--ub-line);
  font-family: var(--ub-font-serif);
  font-size: 1.25rem;
  color: var(--ub-ink) !important;
}

.checkout-summary__trust {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.checkout-summary__trust li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--ub-ink-soft);
  margin-bottom: 0.4rem;
}
.checkout-summary__trust .bi {
  color: var(--ub-primary);
}

@media (max-width: 991.98px) {
  .checkout-summary {
    position: static;
  }
}

/* Confirmation page */
.confirmation-page {
  background: var(--ub-cream);
}
.confirmation-card {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 2.5rem 1.75rem;
}
.confirmation-card__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem);
  margin: 1rem 0 0.5rem;
}
.confirmation-card__lead {
  color: var(--ub-ink-soft);
  margin: 0 0 1.5rem;
}
.confirmation-check {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--ub-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ub-pop 0.45s cubic-bezier(0.2, 0.9, 0.4, 1.4);
}
.confirmation-check svg {
  width: 44px;
  height: 44px;
  stroke: var(--ub-cream);
}
.confirmation-check svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: ub-draw 0.6s 0.15s ease forwards;
}
@keyframes ub-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes ub-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.confirmation-spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ub-primary);
  font-size: 2.5rem;
  animation: ub-spin 1.2s linear infinite;
}
@keyframes ub-spin {
  to {
    transform: rotate(360deg);
  }
}

.confirmation-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
  text-align: left;
  background: var(--ub-cream);
  border-radius: var(--ub-radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 0.5rem;
}
.confirmation-card__meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ub-ink-muted);
  margin-bottom: 0.15rem;
}
.confirmation-card__meta dd {
  margin: 0;
  font-weight: 500;
  word-break: break-word;
}

/* Download error page */
.download-error-page {
  background: var(--ub-cream);
}
.download-error-card {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 2.5rem 1.75rem;
}
.download-error-card__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: var(--ub-cream-200, var(--ub-cream));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ub-primary);
  font-size: 2rem;
}
.download-error-card__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.4rem, 1.6vw + 1rem, 1.9rem);
  margin: 0 0 0.75rem;
}
.download-error-card__lead {
  color: var(--ub-ink-soft);
  margin: 0 0 1.25rem;
}
.download-error-card__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* =============================================================================
   Account / Auth pages
   ========================================================================== */

/* Centred auth card used by login / register / forgot / reset */
.auth-page {
  background: var(--ub-cream);
}
.auth-card {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--ub-shadow-sm);
}
.auth-card__head {
  margin-bottom: 1.75rem;
}
.auth-card__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.5rem, 1.5vw + 1.1rem, 2rem);
  margin: 0 0 0.5rem;
}
.auth-card__lead {
  color: var(--ub-ink-soft);
  margin: 0;
}
.auth-card__alt {
  color: var(--ub-ink-soft);
  font-size: 0.95rem;
}

/* Authenticated account area (dashboard / orders / settings) */
.account-page {
  background: var(--ub-cream);
  min-height: 60vh;
}
.account-header__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.6rem, 1.6vw + 1.1rem, 2.1rem);
  margin: 0 0 0.25rem;
}
.account-header__lead {
  color: var(--ub-ink-soft);
  margin: 0;
}

/* Sidebar */
.account-sidebar {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 1rem;
}
.account-sidebar__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--ub-line);
}
.account-sidebar__avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--ub-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ub-font-serif);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.account-sidebar__name {
  font-weight: 600;
  color: var(--ub-ink);
  line-height: 1.2;
}
.account-sidebar__email {
  font-size: 0.85rem;
  color: var(--ub-ink-muted);
  word-break: break-all;
}
.account-sidebar__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.account-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--ub-radius-sm);
  color: var(--ub-ink-soft);
  text-decoration: none;
  transition:
    background 120ms ease,
    color 120ms ease;
}
.account-sidebar__link:hover,
.account-sidebar__link:focus {
  background: var(--ub-cream);
  color: var(--ub-ink);
}
.account-sidebar__link.is-active {
  background: var(--ub-primary);
  color: #fff;
}
.account-sidebar__link.is-active:hover {
  color: #fff;
}
.account-sidebar__logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ub-line);
  color: var(--ub-ink-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.account-sidebar__logout:hover {
  color: var(--ub-primary-dark);
}

/* Section card wrapping content blocks in the account area */
.account-section {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.5rem 1.25rem;
}
.account-section__title {
  font-family: var(--ub-font-serif);
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

/* Stat cards on the dashboard */
.stat-card {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1rem 1.1rem;
  height: 100%;
}
.stat-card__label {
  color: var(--ub-ink-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-card__value {
  font-family: var(--ub-font-serif);
  font-size: 1.75rem;
  color: var(--ub-ink);
  line-height: 1.1;
  margin-top: 0.35rem;
}
.stat-card__hint {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--ub-primary);
}

/* Order list (used on dashboard recent + my orders) */
.order-list__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--ub-line);
}
.order-list__item:last-child {
  border-bottom: 0;
}
.order-list__main {
  flex: 1 1 auto;
  min-width: 0;
}
.order-list__title {
  font-weight: 600;
  color: var(--ub-ink);
  margin-bottom: 0.15rem;
}
.order-list__title a {
  color: inherit;
  text-decoration: none;
}
.order-list__title a:hover {
  color: var(--ub-primary-dark);
}
.order-list__meta {
  font-size: 0.88rem;
  color: var(--ub-ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.order-list__hint {
  font-size: 0.85rem;
  color: var(--ub-ink-soft);
}
.order-list__side {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Status pills */
.order-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--ub-line);
  background: var(--ub-cream);
  color: var(--ub-ink-soft);
}
.order-status--paid {
  background: #e6f4ec;
  color: var(--ub-primary-dark);
  border-color: #c6e5d2;
}
.order-status--pending {
  background: #fff6e0;
  color: #8a6d1a;
  border-color: #f2e1a6;
}
.order-status--failed,
.order-status--refunded {
  background: #fbe9e7;
  color: #a23a2b;
  border-color: #f1c8c0;
}

/* Empty state */
.empty-state {
  background: var(--ub-paper);
  border: 1px dashed var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--ub-ink-soft);
}
.empty-state i {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ub-cream);
  color: var(--ub-primary);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Compact responsive tweaks */
@media (max-width: 575.98px) {
  .order-list__item {
    flex-wrap: wrap;
  }
  .order-list__side {
    width: 100%;
    justify-content: flex-start;
  }
  .account-sidebar {
    position: static;
  }
}

/* -----------------------------------------------------------------------------
   18. Blog — hero, listing, featured card, sidebar, single post
   ----------------------------------------------------------------------------- */

/* Hero band shown above the listing */
.blog-hero {
  background: var(--ub-cream);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.blog-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ub-primary);
  margin-bottom: 0.5rem;
}
.blog-hero__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(2rem, 3vw + 1rem, 3.25rem);
  margin: 0 0 0.75rem;
}
.blog-hero__lead {
  color: var(--ub-ink-soft);
  font-size: 1.1rem;
  max-width: 38rem;
  margin: 0 auto;
}

.blog-listing {
  padding: clamp(1.5rem, 4vw, 3rem) 0 4rem;
}

.blog-search-summary {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

/* Category pill — reused on cards, breadcrumbs, and the post header */
.blog-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--ub-cream-200);
  color: var(--ub-primary-dark);
  text-decoration: none;
  margin-bottom: 0.5rem;
}
.blog-pill:hover {
  background: var(--ub-accent);
  color: var(--ub-primary-dark);
}
.blog-pill--lg {
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
}

/* Featured card (first post on page 1 of the listing) */
.blog-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  overflow: hidden;
}
.blog-featured__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--ub-cream-200);
  overflow: hidden;
}
.blog-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-featured:hover .blog-featured__media img {
  transform: scale(1.03);
}
.blog-featured__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--ub-ink-muted);
  font-size: 3rem;
}
.blog-featured__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
}
.blog-featured__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.5rem, 1.5vw + 1rem, 2rem);
  line-height: 1.2;
  margin: 0;
}
.blog-featured__title a {
  color: inherit;
  text-decoration: none;
}
.blog-featured__title a:hover {
  color: var(--ub-primary-dark);
}
.blog-featured__excerpt {
  color: var(--ub-ink-soft);
  margin: 0;
}
.blog-featured__meta {
  color: var(--ub-ink-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.blog-featured .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

@media (max-width: 767.98px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }
  .blog-featured__media {
    aspect-ratio: 16 / 10;
  }
}

/* Card extras used by the listing + related grid */
.blog-card__title a {
  color: inherit;
  text-decoration: none;
}
.blog-card__title a:hover {
  color: var(--ub-primary-dark);
}
.blog-card__excerpt--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  color: var(--ub-ink-muted);
  font-size: 0.88rem;
}
.blog-card__foot .blog-card__more {
  margin-top: 0;
}

/* Pagination — tighten Bootstrap defaults to the brand */
.blog-pagination .page-link {
  color: var(--ub-ink-soft);
  border: 1px solid var(--ub-line);
  background: var(--ub-paper);
}
.blog-pagination .page-item.active .page-link {
  background: var(--ub-primary);
  border-color: var(--ub-primary);
  color: var(--ub-cream);
}
.blog-pagination .page-link:hover {
  background: var(--ub-cream);
  color: var(--ub-primary-dark);
}

/* Sidebar — shared by /blog and /blog/{slug} */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.blog-sidebar__panel {
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.25rem 1.25rem 1.5rem;
}
.blog-sidebar__panel--cta {
  background: linear-gradient(
    135deg,
    var(--ub-primary) 0%,
    var(--ub-primary-dark) 100%
  );
  border-color: transparent;
  color: var(--ub-cream);
}
.blog-sidebar__panel--cta .blog-sidebar__title {
  color: var(--ub-cream);
}
.blog-sidebar__title {
  font-family: var(--ub-font-serif);
  font-size: 1.15rem;
  margin: 0 0 1rem;
}
.blog-sidebar__lead {
  color: rgba(248, 244, 239, 0.85);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.blog-search .form-control {
  border-color: var(--ub-line);
  background: var(--ub-paper);
}

/* Tag list */
.blog-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.blog-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--ub-cream);
  border: 1px solid var(--ub-line);
  color: var(--ub-ink-soft);
  text-decoration: none;
  font-size: 0.85rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.blog-tag:hover {
  background: var(--ub-primary);
  color: var(--ub-cream);
  border-color: var(--ub-primary);
}
.blog-tag__count {
  font-size: 0.75rem;
  color: var(--ub-ink-muted);
  background: var(--ub-paper);
  border-radius: 999px;
  padding: 0 0.45rem;
}
.blog-tag:hover .blog-tag__count {
  color: var(--ub-primary-dark);
}

/* Recent posts */
.blog-recent {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.blog-recent__item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.blog-recent__thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--ub-radius-sm);
  overflow: hidden;
  background: var(--ub-cream-200);
}
.blog-recent__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-recent__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--ub-ink-muted);
  font-size: 1.2rem;
}
.blog-recent__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.blog-recent__title {
  color: var(--ub-ink);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  font-size: 0.95rem;
}
.blog-recent__title:hover {
  color: var(--ub-primary-dark);
}
.blog-recent__date {
  font-size: 0.8rem;
  color: var(--ub-ink-muted);
}

/* Sidebar newsletter form */
.blog-newsletter {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.blog-newsletter input[type="email"] {
  border: 1px solid rgba(248, 244, 239, 0.25);
  background: rgba(248, 244, 239, 0.1);
  color: var(--ub-cream);
  padding: 0.65rem 0.85rem;
  border-radius: var(--ub-radius-sm);
}
.blog-newsletter input::placeholder {
  color: rgba(248, 244, 239, 0.55);
}
.blog-newsletter input:focus {
  background: rgba(248, 244, 239, 0.16);
  outline: 0;
}

/* Breadcrumb above the article */
.blog-breadcrumb {
  background: var(--ub-cream);
  border-bottom: 1px solid var(--ub-line);
  padding: 0.85rem 0;
  font-size: 0.9rem;
}
.blog-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--ub-ink-muted);
}
.blog-breadcrumb a {
  color: var(--ub-ink-soft);
  text-decoration: none;
}
.blog-breadcrumb a:hover {
  color: var(--ub-primary-dark);
}
.blog-breadcrumb .active {
  color: var(--ub-ink);
}

/* Single post */
.blog-post {
  background: var(--ub-paper);
  padding: clamp(2rem, 5vw, 4rem) 0;
}
.blog-post__head {
  max-width: 780px;
  text-align: center;
  margin-bottom: 2rem;
}
.blog-post__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(2rem, 3vw + 1rem, 3.25rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}
.blog-post__meta {
  color: var(--ub-ink-muted);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
}
.blog-post__author {
  color: var(--ub-ink-soft);
  font-weight: 600;
}
.blog-post__cover {
  margin: 0 auto 2.5rem;
  max-width: 1040px;
}
.blog-post__cover img {
  width: 100%;
  border-radius: var(--ub-radius);
  box-shadow: var(--ub-shadow);
}
.blog-post__layout {
  position: relative;
}
.blog-post__body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--ub-ink-soft);
}
.blog-post__body h2,
.blog-post__body h3,
.blog-post__body h4 {
  color: var(--ub-ink);
  margin: 2.25rem 0 1rem;
}
.blog-post__body h2 {
  font-size: 1.75rem;
}
.blog-post__body h3 {
  font-size: 1.4rem;
}
.blog-post__body p {
  margin: 0 0 1.25rem;
}
.blog-post__body a {
  color: var(--ub-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-post__body a:hover {
  color: var(--ub-primary);
}
.blog-post__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ub-radius-sm);
  margin: 1.25rem 0;
}
.blog-post__body blockquote {
  border-left: 4px solid var(--ub-primary);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--ub-ink);
  font-style: italic;
}
.blog-post__body ul,
.blog-post__body ol {
  margin: 0 0 1.25rem 1.25rem;
}
.blog-post__body code {
  background: var(--ub-cream);
  padding: 0.1rem 0.4rem;
  border-radius: var(--ub-radius-sm);
  font-size: 0.92em;
}

/* Share bar — sticky on desktop, inline at the bottom on mobile */
.blog-share {
  position: sticky;
  top: calc(var(--ub-header-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}
.blog-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  color: var(--ub-ink-soft);
  text-decoration: none;
  font-size: 1.1rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.05s ease;
  cursor: pointer;
}
.blog-share__btn:hover {
  background: var(--ub-primary);
  color: var(--ub-cream);
  border-color: var(--ub-primary);
}
.blog-share__btn:active {
  transform: translateY(1px);
}
.blog-share__btn--pinterest:hover {
  background: #e60023;
  border-color: #e60023;
  color: #fff;
}
.blog-share__btn--whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}
.blog-share__btn--linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}
.blog-share__btn--x:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}
.blog-share__btn--instagram:hover {
  background: #c13584;
  border-color: #c13584;
  color: #fff;
}
.blog-share__copied {
  font-size: 0.78rem;
  color: var(--ub-primary-dark);
  min-height: 1rem;
  text-align: center;
}

.blog-share--inline {
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.6rem;
  margin: 2.5rem auto 0;
  max-width: 720px;
}
.blog-share--inline .blog-share__btn {
  width: auto;
  height: auto;
  border-radius: var(--ub-radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
}

/* Related posts grid below the article */
.blog-related {
  background: var(--ub-cream);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}
.blog-related__title {
  font-family: var(--ub-font-serif);
  font-size: clamp(1.5rem, 1.5vw + 1rem, 2rem);
  margin: 0 0 1.75rem;
  text-align: center;
}

/* =============================================================================
   Cart badge & product-card cart actions
   ============================================================================= */

/* Badge on the cart icon in the header */
.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--ub-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

/* Product card action row */
.product-card__actions {
  flex-wrap: wrap;
}

/* "Add to Cart" button loading state */
.btn[data-cart-loading] {
  opacity: 0.65;
  pointer-events: none;
}

/* =============================================================================
   Sticky Buy Bar
   ============================================================================= */
.sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: rgba(255, 253, 249, 0.96);
  border-top: 1px solid var(--ub-line);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 -4px 24px -8px rgba(26, 26, 26, 0.1);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.16, 0.64, 1);
  pointer-events: none;
}
.sticky-buy-bar.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-buy-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}
.sticky-buy-bar__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sticky-buy-bar__title {
  font-family: var(--ub-font-serif);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ub-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-buy-bar__price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ub-primary-dark);
}
.sticky-buy-bar__price del {
  color: var(--ub-ink-muted);
  font-weight: 400;
}
.sticky-buy-bar__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
@media (max-width: 479.98px) {
  .sticky-buy-bar__info {
    display: none;
  }
  .sticky-buy-bar__actions {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================================
   Rating stars (shared across product page + cards)
   ============================================================================= */
.rating-stars {
  color: var(--ub-warning);
  display: inline-flex;
  gap: 2px;
  font-size: 0.85rem;
}
.rating-stars--lg {
  font-size: 1.25rem;
}
.rating-score {
  color: var(--ub-ink);
}

/* Rating widget on product cards */
.product-card__rating,
.ap-card__rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--ub-ink-muted);
  margin-bottom: 0.25rem;
}
.product-card__rating .rating-stars,
.ap-card__rating .rating-stars {
  font-size: 0.78rem;
}
.product-card__rating a,
.ap-card__rating a {
  color: var(--ub-ink-muted);
}
.product-card__rating a:hover,
.ap-card__rating a:hover {
  color: var(--ub-primary);
}

/* Product page rating summary */
.product-rating-summary {
  flex-wrap: wrap;
}

/* =============================================================================
   Review section
   ============================================================================= */
.product-reviews {
  background: var(--ub-paper);
}

.review-card {
  background: var(--ub-cream);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}
.review-card:hover {
  box-shadow: var(--ub-shadow);
}
.review-card__stars {
  color: var(--ub-warning);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.review-card__text {
  flex: 1;
  font-size: 0.925rem;
  line-height: 1.65;
  color: var(--ub-ink-soft);
  margin-bottom: 1rem;
}
.review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--ub-line);
  padding-top: 0.75rem;
  font-size: 0.8rem;
}
.review-card__author {
  font-weight: 600;
  color: var(--ub-ink);
}
.review-card__date {
  color: var(--ub-ink-muted);
}

/* Review submission box */
.review-submit-box {
  background: var(--ub-cream);
  border: 1px solid var(--ub-line);
  border-radius: var(--ub-radius-lg);
  padding: 2.5rem;
  max-width: 680px;
}
.review-submit-box__title {
  font-family: var(--ub-font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

/* Star picker (CSS-only interactive stars) */
.star-picker {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}
.star-picker input[type="radio"] {
  display: none;
}
.star-picker label {
  font-size: 1.75rem;
  color: var(--ub-line);
  cursor: pointer;
  transition: color 0.12s ease;
}
/* Highlight hovered + all preceding stars (row-reverse trick) */
.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input:checked ~ label {
  color: var(--ub-warning);
}
.star-picker:hover label {
  color: var(--ub-line);
}
.star-picker:hover label:hover,
.star-picker:hover label:hover ~ label {
  color: var(--ub-warning);
}

/* =============================================================================
   Ebook finder
   ============================================================================= */
.ebook-finder {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1090;
  font-family: var(--ub-font-sans);
}

.ebook-finder__launcher {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--ub-primary);
  color: var(--ub-cream);
  box-shadow: var(--ub-shadow-lg);
  font-size: 1.35rem;
}

.ebook-finder__launcher:hover,
.ebook-finder__launcher:focus {
  background: var(--ub-primary-dark);
}

.ebook-finder__panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(680px, calc(100vh - 6rem));
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) auto;
  overflow: hidden;
  background: var(--ub-paper);
  border: 1px solid var(--ub-line);
  border-radius: 8px;
  box-shadow: var(--ub-shadow-lg);
}

.ebook-finder__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--ub-line);
  background: var(--ub-cream);
}

.ebook-finder__head strong {
  display: block;
  color: var(--ub-ink);
  font-size: 0.95rem;
}

.ebook-finder__head span {
  display: block;
  color: var(--ub-ink-muted);
  font-size: 0.78rem;
}

.ebook-finder__close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ub-ink-soft);
}

.ebook-finder__close:hover,
.ebook-finder__close:focus {
  background: var(--ub-cream-200);
  color: var(--ub-primary-dark);
}

.ebook-finder__messages {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem;
  overflow-y: auto;
  min-height: 0;
}

.finder-message {
  max-width: 88%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.finder-message--finder {
  align-self: flex-start;
  background: var(--ub-cream);
  border: 1px solid var(--ub-line);
  color: var(--ub-ink-soft);
}

.finder-message--user {
  align-self: flex-end;
  background: var(--ub-primary);
  color: var(--ub-cream);
  white-space: pre-wrap;
}

.finder-message a {
  color: var(--ub-primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.finder-message--user a {
  color: var(--ub-cream);
}

.finder-message p {
  margin: 0;
}

.finder-message ol {
  margin: 0.45rem 0 0;
  padding-left: 1.3rem;
}

.finder-message li + li {
  margin-top: 0.35rem;
}

.ebook-finder__form {
  display: block;
  padding: 0.75rem;
  border-top: 1px solid var(--ub-line);
  background: var(--ub-paper);
}

.ebook-finder__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 150px;
  overflow-y: auto;
}

.finder-choice {
  min-height: 36px;
  border: 1px solid var(--ub-line);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ub-primary-dark);
  background: #fff;
  text-align: left;
}

.finder-choice:hover,
.finder-choice:focus {
  outline: 0;
  border-color: var(--ub-primary-light);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.18);
}

.finder-choice:disabled {
  cursor: wait;
  opacity: 0.65;
}

.finder-choice-empty {
  color: var(--ub-ink-muted);
  font-size: 0.84rem;
}

.ebook-finder.is-busy .ebook-finder__messages::after {
  content: "Finding...";
  align-self: flex-start;
  color: var(--ub-ink-muted);
  font-size: 0.82rem;
}

@media (max-width: 575.98px) {
  .ebook-finder {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .ebook-finder__panel {
    width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 5.5rem);
  }
}
