.shop-toolbar > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Brand loading and internal-page transition */
.site-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--forest);
  color: var(--ivory);
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.68s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s;
}

.loader-lockup {
  width: min(430px, calc(100% - 64px));
  text-align: center;
}

.loader-lockup span {
  display: block;
  font: 400 clamp(64px, 9vw, 132px)/0.82 var(--serif);
  letter-spacing: 0.08em;
}

.loader-lockup small {
  display: block;
  margin-top: 13px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.loader-lockup i {
  position: relative;
  display: block;
  height: 1px;
  margin-top: 28px;
  overflow: hidden;
  background: rgba(246, 241, 231, 0.24);
}

.loader-lockup i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ivory);
  transform-origin: left;
  animation: koshra-load 1.15s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

.site-loader.is-leaving {
  pointer-events: none;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.68s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 0.68s;
}

body:not(.page-ready),
body.page-exit {
  overflow: hidden;
}

body:not(.page-ready) #site-shell,
body:not(.page-ready) main,
body:not(.page-ready) #overlay-root {
  opacity: 0;
  transform: translateY(12px);
}

#site-shell,
main,
#overlay-root {
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-exit .site-loader.is-leaving {
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.43s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s;
}

body.page-exit #site-shell,
body.page-exit main,
body.page-exit #overlay-root {
  opacity: 0.25;
  transform: translateY(10px);
}

@keyframes koshra-load {
  0% { transform: translateX(-105%) scaleX(0.35); }
  55% { transform: translateX(0) scaleX(0.72); }
  100% { transform: translateX(105%) scaleX(0.35); }
}

/* Keep the editorial headline tight without letting adjacent lines collide. */
.hero-copy .display {
  line-height: 0.97;
}

/* Shared structural safeguards */
[hidden] {
  display: none !important;
}

.site-header > *,
.hero > *,
.page-hero > *,
.product-detail > *,
.builder-layout > *,
.quote-layout > *,
.checkout-layout > *,
.cart-layout > *,
.contact-grid > *,
.form-grid > * {
  min-width: 0;
}

.announcement span {
  line-height: 34px;
  text-align: center;
}

.header-tools {
  flex-wrap: nowrap;
  gap: 12px;
  padding-inline: 18px;
}

.header-tools .icon-button {
  width: auto;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.product-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product-image {
  display: block;
  flex: 0 0 auto;
}

.product-info {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.product-meta {
  overflow-wrap: anywhere;
}

.product-price {
  gap: 12px;
}

.product-price span {
  max-width: 62%;
  text-align: right;
}

.card-actions {
  margin-top: auto;
}

.card-actions .btn {
  min-width: 0;
  padding-inline: 10px;
  text-align: center;
}

.display,
.section-title,
.detail-panel h1 {
  text-wrap: balance;
}

.filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-close {
  display: none;
}

.product-grid.list-view {
  display: block;
  border-top: var(--line);
}

.product-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  border-left: var(--line);
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 210px 1fr 190px;
  }

  .brand {
    padding-inline: 20px;
  }

  .desktop-nav > a,
  .nav-drop > button {
    min-width: auto;
    padding-inline: 10px;
    font-size: 9px;
  }

  .header-tools {
    gap: 7px;
    padding-inline: 12px;
  }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 64px 1fr 110px;
  }

  .menu-button {
    display: block;
  }

  .brand {
    justify-content: center;
    padding: 0;
    border: 0;
  }

  .brand small,
  .desktop-nav,
  .account-link,
  .header-tools .search-text,
  .header-tools .bag-text {
    display: none;
  }

  .header-tools {
    gap: 4px;
    padding-inline: 10px;
  }

  .header-tools .icon-button {
    width: 40px;
    min-width: 40px;
  }
}

.product-grid.list-view .product-image {
  height: 280px;
}

.product-grid.list-view .product-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-grid.list-view .product-info h3,
.product-grid.list-view .product-info p {
  min-height: 0;
}

.product-grid.list-view .product-meta {
  grid-column: 1;
}

.product-grid.list-view .product-price,
.product-grid.list-view .card-actions {
  grid-column: 2;
}

@media (max-width: 760px) {
  .loader-lockup span {
    font-size: clamp(58px, 21vw, 86px);
  }

  .hero-copy .display {
    line-height: 0.98;
  }
  .announcement {
    height: 34px;
  }

  .site-header {
    grid-template-columns: 56px 1fr 100px;
  }

  .header-tools {
    padding-inline: 8px;
  }

  .shop-toolbar {
    flex-wrap: wrap;
  }

  .shop-toolbar > div:last-child {
    width: 100%;
    justify-content: space-between;
  }

  .shop-toolbar select {
    max-width: 150px;
  }

  .hero-media {
    flex: 0 0 auto;
    height: 118vw;
    min-height: 0;
  }

  .builder-media,
  .corporate-media,
  .packaging-photo,
  .page-hero-media,
  .corporate-hero-media,
  .case-study-media {
    flex: 0 0 auto;
    height: 110vw;
    min-height: 0;
  }

  .hero-media img,
  .builder-media img,
  .corporate-media img,
  .packaging-photo img,
  .page-hero-media img,
  .corporate-hero-media img,
  .case-study-media img {
    height: 100%;
  }

  .filters {
    position: fixed;
    z-index: 110;
    display: block;
    inset: 0 0 0 auto;
    width: min(360px, 100%);
    padding: 28px;
    background: var(--ivory);
    transform: translateX(105%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .filters.mobile-open {
    transform: none;
  }

  .filter-close {
    display: block;
  }

  .product-grid.list-view .product-card {
    display: block;
    border: var(--line);
  }

  .product-grid.list-view .product-image {
    height: 110vw;
  }

  .product-grid.list-view .product-info {
    display: block;
  }

  .product-price span {
    max-width: 54%;
  }

  .footer-col a,
  .footer-bottom span {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-lockup i::after {
    animation: none;
    transform: none;
  }

  .site-loader,
  .site-loader.is-leaving,
  body.page-exit .site-loader.is-leaving,
  #site-shell,
  main,
  #overlay-root {
    transition-duration: 0.01ms;
  }
}
