/* Static-site overrides: replace behaviour that the original platform scripts used to provide. */

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, iframe, video { max-width: 100%; }

/* ---- Images that fill their frame (focal point is set inline as object-position) ---- */
.Index-page-image img,
.sqs-gallery-block-grid .image-slide-anchor img,
.sqs-image-shape-container-element img,
.ProductList-innerImageWrapper img,
.ProductItem-gallery-slides-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.Index-page { position: relative; }
.Index-page-image { overflow: hidden; }
.sqs-gallery-block-grid .image-slide-anchor { position: relative; overflow: hidden; }
.sqs-gallery[data-lightbox] .image-slide-anchor { cursor: zoom-in; }
.ProductItem-gallery-thumbnails-item { position: relative; height: 105px; overflow: hidden; cursor: pointer; opacity: .6; transition: opacity .2s; }
.ProductItem-gallery-thumbnails-item.is-active,
.ProductItem-gallery-thumbnails-item:hover { opacity: 1; }
.ProductItem-gallery-thumbnails-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Spacer blocks keep their aspect ratio without script ---- */
.sqs-block-spacer.sized .sqs-block-content { height: auto; }

/* ---- Video embed ---- */
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Marquee (scrolling announcement) ---- */
.Marquee-display { position: relative; overflow: hidden; width: 100%; }
.Marquee-display > h1 { display: none; }
.Marquee-measure { position: static; visibility: visible; display: flex; flex-wrap: nowrap; width: max-content;
  animation: marquee-scroll var(--marquee-duration, 30s) linear infinite; }
.Marquee-measure .Marquee-item { white-space: nowrap; flex: 0 0 auto; }
.Marquee:hover .Marquee-measure { animation-play-state: paused; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .Marquee-measure { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ---- Forms ---- */
.form-wrapper .form-item.error input,
.form-wrapper .form-item.error select,
.form-wrapper .form-item.error textarea { border-color: #c0392b !important; }
.form-wrapper .field-error { display: block; margin: 6px 0; padding: 6px 10px; background: #c0392b; color: #fff; font-size: 13px; border-radius: 2px; }
.form-wrapper .form-status-error { margin: 12px 0; padding: 10px 14px; background: #fdecea; color: #8a1c12; border-left: 3px solid #c0392b; }
.form-submission-text { padding: 24px 0; }
.form-wrapper button[disabled], .form-wrapper input[type=submit][disabled] { opacity: .6; cursor: progress; }

/* ---- Lightbox ---- */
.wm-lightbox { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 6, 6, .94); padding: 48px 56px; box-sizing: border-box; }
.wm-lightbox[hidden] { display: none; }
.wm-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.wm-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1;
  cursor: pointer; padding: 12px; opacity: .8; }
.wm-lightbox button:hover, .wm-lightbox button:focus-visible { opacity: 1; }
.wm-lightbox .wm-lb-close { top: 8px; right: 12px; }
.wm-lightbox .wm-lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.wm-lightbox .wm-lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---- Order dialog (Add To Cart) and cart page ---- */
.wm-dialog { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; background: rgba(15, 6, 6, .7); padding: 40px 16px; box-sizing: border-box; }
.wm-dialog[hidden] { display: none; }
.wm-dialog-panel { position: relative; width: 100%; max-width: 560px; background: #fff; color: #3c342f; padding: 32px;
  box-sizing: border-box; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.wm-dialog-panel h2 { margin-top: 0; }
.wm-dialog-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 30px; cursor: pointer; color: inherit; }
.wm-field { margin-bottom: 18px; }
.wm-field label { display: block; font-weight: 700; margin-bottom: 4px; }
.wm-field .wm-help { font-size: 13px; opacity: .75; margin: 0 0 6px; }
.wm-field input, .wm-field textarea, .wm-field select { width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid #c9c2bd; background: #fafafa; font: inherit; color: inherit; }
.wm-field textarea { min-height: 90px; }
.wm-field.error input, .wm-field.error textarea, .wm-field.error select { border-color: #c0392b; }

.wm-cart { max-width: 900px; margin: 0 auto; }
.wm-cart h1 { margin-bottom: 1em; }
.wm-cart-empty { text-align: center; padding: 40px 0; }
.wm-cart-row { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid rgba(0,0,0,.1); }
.wm-cart-row img { width: 90px; height: 120px; object-fit: cover; display: block; }
.wm-cart-row .wm-cart-meta { font-size: 14px; opacity: .8; }
.wm-cart-row input { width: 64px; padding: 6px; font: inherit; }
.wm-cart-remove { background: none; border: 0; text-decoration: underline; cursor: pointer; font: inherit; color: inherit; padding: 0; }
.wm-cart-total { text-align: right; font-size: 20px; margin: 24px 0; }
.wm-btn { display: inline-block; padding: 14px 28px; background: #3c342f; color: #fff !important; border: 0; cursor: pointer;
  font: inherit; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; }
.wm-btn:hover { background: #5a4e47; }
.wm-note { font-size: 14px; opacity: .8; }

/* ---- Shop category filter (client side) ---- */
.ProductList-item.is-filtered-out { display: none !important; }

/* ---- Header: logo left, long menu right and allowed to wrap instead of overlapping the logo ---- */
[data-nc-base="header"] [data-nc-container="bottom-left"] { flex: 0 0 auto; margin-right: 32px; }
[data-nc-base="header"] [data-nc-container="bottom-right"] { flex: 1 1 0; min-width: 0; justify-content: flex-end; }
[data-nc-base="header"] [data-nc-container="bottom-right"] .Header-nav--primary { flex: 1 1 auto; min-width: 0; }
.Header-nav--primary .Header-nav-inner { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; row-gap: 4px; }
@media screen and (min-width: 730px) and (max-width: 1100px) {
  .Header-branding-logo { max-width: 130px; }
  .Header-nav--primary .Header-nav-item, .Header-nav--primary .Header-nav-folder-title { font-size: 13px; }
}

/* ---- Responsive fixes ---- */
@media screen and (max-width: 768px) {
  /* text blocks authored with large fixed left margins next to floated media */
  .sqs-html-content [style*="margin-left"] { margin-left: 0 !important; }
  .sqs-block.float { float: none !important; width: auto !important; max-width: 100%; margin: 0 0 24px !important; }
  .sqs-layout .sqs-row .sqs-col-1, .sqs-layout .sqs-row .sqs-col-2, .sqs-layout .sqs-row .sqs-col-3,
  .sqs-layout .sqs-row .sqs-col-4, .sqs-layout .sqs-row .sqs-col-5, .sqs-layout .sqs-row .sqs-col-6,
  .sqs-layout .sqs-row .sqs-col-7, .sqs-layout .sqs-row .sqs-col-8, .sqs-layout .sqs-row .sqs-col-9,
  .sqs-layout .sqs-row .sqs-col-10, .sqs-layout .sqs-row .sqs-col-11 { width: 100% !important; float: none !important; }
  .Footer-blocks .sqs-row .col { width: 100% !important; float: none !important; }
  .wm-cart-row { grid-template-columns: 70px 1fr; }
  .wm-cart-row img { width: 70px; height: 94px; }
  .wm-cart-row > :nth-child(3), .wm-cart-row > :nth-child(4) { grid-column: 2; }
}
@media screen and (max-width: 640px) {
  .sqs-gallery-block-grid .sqs-gallery-design-grid-slide { width: 50% !important; clear: none !important; }
  .Header-nav-folder { position: static; }
  .wm-dialog-panel { padding: 24px 18px; }
  .wm-lightbox { padding: 48px 8px; }
  .ProductItem-gallery-thumbnails-item { width: 56px; height: 84px; }
  .Index-page-content { padding-left: 20px !important; padding-right: 20px !important; }
  h1 { overflow-wrap: break-word; }
  .Marquee-measure .Marquee-item { font-size: 1.1rem !important; }
}
