:root {
  --sfa-fix-navy: #102a43;
  --sfa-fix-navy-deep: #071a2d;
  --sfa-fix-red: #a61b29;
  --sfa-fix-gold: #b99032;
  --sfa-fix-ink: #172331;
  --sfa-fix-muted: #5d6875;
  --sfa-fix-line: #d8dee6;
  --sfa-fix-surface: #f6f8fb;
  --sfa-fix-white: #fff;
}

.sfa-category-browser {
  clear: both;
  width: 100%;
  max-width: 1180px;
  margin: 1.5rem auto 3rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--sfa-fix-line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f7f9fb 100%);
  box-shadow: 0 14px 38px rgb(7 26 45 / 9%);
}

.sfa-category-browser *,
.sfa-category-browser *::before,
.sfa-category-browser *::after {
  box-sizing: border-box;
}

.sfa-category-browser__heading {
  max-width: 760px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.sfa-category-browser__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--sfa-fix-red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sfa-category-browser__heading h2 {
  margin: 0 0 0.45rem;
  color: var(--sfa-fix-navy-deep);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.12;
}

.sfa-category-browser__heading p:last-child {
  margin: 0;
  color: var(--sfa-fix-muted);
}

.sfa-category-browser__select {
  display: none;
  width: 100%;
  min-height: 48px;
  margin: 0 0 1rem;
  border: 1px solid #aebbc8;
  border-radius: 8px;
  background: #fff;
  color: var(--sfa-fix-ink);
  font-weight: 650;
}

.sfa-category-browser__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.sfa-category-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--sfa-fix-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgb(7 26 45 / 7%);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.sfa-category-card:hover,
.sfa-category-card:focus-within {
  border-color: #b8c3ce;
  box-shadow: 0 15px 34px rgb(7 26 45 / 13%);
  transform: translateY(-3px);
}

.sfa-category-card__image-link {
  position: relative;
  display: block;
  min-height: 180px;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 50% 30%, #fff, #e7edf3);
  overflow: hidden;
}

.sfa-category-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 220ms ease;
}

.sfa-category-card:hover .sfa-category-card__image,
.sfa-category-card:focus-within .sfa-category-card__image {
  transform: scale(1.025);
}

.sfa-category-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 180px;
  place-items: center;
  background:
    radial-gradient(circle at 65% 25%, rgb(185 144 50 / 28%), transparent 31%),
    linear-gradient(135deg, var(--sfa-fix-navy-deep), var(--sfa-fix-navy));
}

.sfa-category-card__placeholder span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 72%);
  border-radius: 50%;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  font-weight: 700;
}

.sfa-category-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.15rem;
}

.sfa-category-card__body h3 {
  margin: 0 0 0.65rem;
  color: var(--sfa-fix-navy-deep);
  font-size: 1.28rem;
  line-height: 1.2;
}

.sfa-category-card__body h3 a {
  color: inherit;
  text-decoration: none;
}

.sfa-category-card__children {
  display: grid;
  gap: 0.3rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.sfa-category-card__children li {
  margin: 0;
  padding: 0;
}

.sfa-category-card__children a {
  display: inline-block;
  color: #445363;
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: none;
}

.sfa-category-card__children a::before {
  margin-right: 0.42rem;
  color: var(--sfa-fix-gold);
  content: "•";
}

.sfa-category-card__children a:hover,
.sfa-category-card__children a:focus {
  color: var(--sfa-fix-red);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.sfa-category-card__button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  color: var(--sfa-fix-navy);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.sfa-category-card__button:hover,
.sfa-category-card__button:focus {
  color: var(--sfa-fix-red);
}

.sfa-category-browser__all {
  margin-top: 1.35rem;
  text-align: center;
}

.sfa-category-browser__all .button {
  min-height: 44px;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--sfa-fix-navy);
  border-radius: 7px;
  background: var(--sfa-fix-navy);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.sfa-shop-categories-menu > .sub-menu {
  min-width: 270px;
  columns: 1;
}

.sfa-shop-category-menu-item--all > a {
  border-top: 1px solid rgb(255 255 255 / 18%);
  font-weight: 800 !important;
}

/* Repair the existing designer preview even when a theme or optimization plugin changes layout rules. */
.sfa-designer--storefront-fix-ready .sfa-preview {
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
}

.sfa-designer--storefront-fix-ready .sfa-preview__image {
  z-index: 1;
}

.sfa-designer--storefront-fix-ready .sfa-preview__area {
  z-index: 8 !important;
  top: var(--sfa-y, var(--sfa-fix-y)) !important;
  left: var(--sfa-x, var(--sfa-fix-x)) !important;
  display: grid !important;
  width: var(--sfa-w, var(--sfa-fix-w)) !important;
  height: var(--sfa-h, var(--sfa-fix-h)) !important;
  place-items: center;
  opacity: 1 !important;
  visibility: visible !important;
}

.sfa-designer--storefront-fix-ready .sfa-preview__area--sfa-fix {
  position: absolute;
  padding: 2px 4px;
  border: 1px dashed rgb(16 42 67 / 28%);
  border-radius: 4px;
  color: rgb(16 42 67 / 55%);
  line-height: 1.08;
  text-align: center;
  pointer-events: none;
}

.sfa-designer--storefront-fix-ready .sfa-preview__area span {
  display: block !important;
  max-width: 100%;
  max-height: 100%;
  color: inherit;
  opacity: 1 !important;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  visibility: visible !important;
}

.sfa-designer--storefront-fix-ready .sfa-preview__area--filled {
  border-color: transparent !important;
  color: #0a1118 !important;
  text-shadow:
    -1px -1px 0 rgb(255 255 255 / 78%),
    1px -1px 0 rgb(255 255 255 / 78%),
    -1px 1px 0 rgb(255 255 255 / 78%),
    1px 1px 0 rgb(255 255 255 / 78%),
    0 1px 2px rgb(0 0 0 / 18%);
}

.sfa-fix-live-badge {
  position: absolute;
  z-index: 12;
  top: 10px;
  left: 10px;
  padding: 0.32rem 0.55rem;
  border: 1px solid rgb(255 255 255 / 52%);
  border-radius: 999px;
  background: rgb(7 26 45 / 87%);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

/* Live engraving mirrored over the main WooCommerce gallery image. */
.woocommerce-product-gallery.sfa-gallery-preview-host {
  position: relative !important;
}

.sfa-gallery-live-preview {
  position: absolute;
  z-index: 50;
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
}

.sfa-gallery-live-preview[hidden] {
  display: none !important;
}

.sfa-gallery-live-preview__badge {
  position: absolute;
  z-index: 5;
  top: 8px;
  left: 8px;
  padding: 0.3rem 0.52rem;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 999px;
  background: rgb(7 26 45 / 86%);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgb(0 0 0 / 16%);
}

.sfa-gallery-live-preview__area {
  position: absolute;
  z-index: 4;
  top: var(--sfa-fix-y);
  left: var(--sfa-fix-x);
  display: grid;
  width: var(--sfa-fix-w);
  height: var(--sfa-fix-h);
  place-items: center;
  padding: 2px 4px;
  color: #071019;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  text-shadow:
    -1px -1px 0 rgb(255 255 255 / 92%),
    1px -1px 0 rgb(255 255 255 / 92%),
    -1px 1px 0 rgb(255 255 255 / 92%),
    1px 1px 0 rgb(255 255 255 / 92%),
    0 2px 3px rgb(0 0 0 / 28%);
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.sfa-gallery-live-preview__area[hidden] {
  display: none !important;
}

.sfa-gallery-live-preview__area span {
  display: block;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.sfa-fix-font--clean-sans-serif .sfa-preview__area span,
.sfa-fix-font--clean-sans-serif .sfa-gallery-live-preview__area {
  font-family: Arial, Helvetica, sans-serif !important;
}

.sfa-fix-font--formal-script .sfa-preview__area span,
.sfa-fix-font--formal-script .sfa-gallery-live-preview__area {
  font-family: "Brush Script MT", "Segoe Script", cursive !important;
  font-weight: 500;
}

.sfa-fix-font--military-stencil .sfa-preview__area span,
.sfa-fix-font--military-stencil .sfa-gallery-live-preview__area {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif !important;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .sfa-category-browser__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sfa-category-browser {
    margin: 1rem auto 2rem;
    padding: 1rem;
    border-radius: 11px;
  }

  .sfa-category-browser__select {
    display: block;
  }

  .sfa-category-browser__grid {
    grid-template-columns: 1fr;
  }

  .sfa-category-card__image-link,
  .sfa-category-card__placeholder {
    min-height: 150px;
  }

  .sfa-gallery-live-preview__badge {
    top: 5px;
    left: 5px;
    font-size: 0.54rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sfa-category-card,
  .sfa-category-card__image {
    transition: none;
  }
}

/* ================================================================
   WooCommerce catalog grid repair — v1.1.0
   Storefront applies percentage widths to product cards at desktop.
   When those cards are also placed in a CSS grid, the percentages can
   shrink each card to only a few pixels. These rules make each grid item
   fill its cell and remove the unrelated blog sidebar from catalog pages.
   ================================================================ */
body.sfa-catalog-full-width #primary,
body.sfa-catalog-full-width .content-area {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

body.sfa-catalog-full-width #secondary,
body.sfa-catalog-full-width #secondary.widget-area,
body.sfa-catalog-full-width .woocommerce-sidebar {
  display: none !important;
}

body.sfa-catalog-grid-repaired .site-main ul.products {
  display: grid !important;
  clear: both !important;
  grid-template-columns: repeat(var(--sfa-catalog-columns, 4), minmax(0, 1fr)) !important;
  gap: 1.4rem !important;
  width: 100% !important;
  margin: 0 0 2.5rem !important;
  padding: 0 !important;
  list-style: none !important;
}

body.sfa-catalog-grid-repaired.sfa-catalog-columns-3 .site-main ul.products {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.sfa-catalog-grid-repaired.sfa-catalog-columns-4 .site-main ul.products {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.sfa-catalog-grid-repaired .site-main ul.products::before,
body.sfa-catalog-grid-repaired .site-main ul.products::after {
  display: none !important;
  content: none !important;
}

body.sfa-catalog-grid-repaired .site-main ul.products > li.product,
body.sfa-catalog-grid-repaired .site-main ul.products[class*="columns-"] > li.product,
body.sfa-catalog-grid-repaired .site-main ul.products > li.product.first,
body.sfa-catalog-grid-repaired .site-main ul.products > li.product.last {
  position: relative;
  display: flex !important;
  float: none !important;
  clear: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100%;
  margin: 0 !important;
  padding: 0 0 1.15rem !important;
  flex-direction: column;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(7 26 45 / 8%);
  text-align: left !important;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

body.sfa-catalog-grid-repaired .site-main ul.products > li.product:hover,
body.sfa-catalog-grid-repaired .site-main ul.products > li.product:focus-within {
  border-color: #b6c1cc;
  box-shadow: 0 16px 36px rgb(7 26 45 / 14%);
  transform: translateY(-3px);
}

body.sfa-catalog-grid-repaired .site-main ul.products > li.product > a.woocommerce-LoopProduct-link,
body.sfa-catalog-grid-repaired .site-main ul.products > li.product > a.woocommerce-loop-product__link {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

body.sfa-catalog-grid-repaired .site-main ul.products > li.product img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  margin: 0 0 1rem !important;
  padding: 0.85rem;
  border: 0;
  border-radius: 0;
  background: #f5f7fa;
  object-fit: contain;
  box-sizing: border-box;
}

body.sfa-catalog-grid-repaired .site-main ul.products > li.product .woocommerce-loop-product__title,
body.sfa-catalog-grid-repaired .site-main ul.products > li.product h2,
body.sfa-catalog-grid-repaired .site-main ul.products > li.product h3 {
  min-height: 2.7em;
  margin: 0 1rem 0.65rem !important;
  color: #071a2d;
  font-size: 1rem !important;
  line-height: 1.35 !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: auto;
}

body.sfa-catalog-grid-repaired .site-main ul.products > li.product .price,
body.sfa-catalog-grid-repaired .site-main ul.products > li.product .star-rating {
  margin-right: 1rem !important;
  margin-left: 1rem !important;
}

body.sfa-catalog-grid-repaired .site-main ul.products > li.product .price {
  margin-top: auto !important;
  margin-bottom: 0.8rem !important;
  color: #a61b29 !important;
  font-size: 1rem !important;
  font-weight: 800;
  line-height: 1.35;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

body.sfa-catalog-grid-repaired .site-main ul.products > li.product .button,
body.sfa-catalog-grid-repaired .site-main ul.products > li.product .added_to_cart {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: calc(100% - 2rem) !important;
  min-height: 44px;
  margin: auto 1rem 0 !important;
  padding: 0.68rem 0.85rem !important;
  border-radius: 7px;
  text-align: center;
  white-space: normal;
  box-sizing: border-box;
}

body.sfa-catalog-grid-repaired .woocommerce-result-count,
body.sfa-catalog-grid-repaired .woocommerce-ordering {
  margin-bottom: 1.4rem;
}

body.sfa-catalog-grid-repaired .woocommerce-ordering select {
  max-width: 100%;
}

body.sfa-catalog-grid-repaired .woocommerce-pagination {
  clear: both;
  margin-top: 1.5rem;
}

@media (max-width: 1050px) {
  body.sfa-catalog-grid-repaired .site-main ul.products,
  body.sfa-catalog-grid-repaired.sfa-catalog-columns-4 .site-main ul.products,
  body.sfa-catalog-grid-repaired.sfa-catalog-columns-3 .site-main ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.sfa-catalog-grid-repaired .site-main ul.products,
  body.sfa-catalog-grid-repaired.sfa-catalog-columns-4 .site-main ul.products,
  body.sfa-catalog-grid-repaired.sfa-catalog-columns-3 .site-main ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }

  body.sfa-catalog-grid-repaired .woocommerce-result-count,
  body.sfa-catalog-grid-repaired .woocommerce-ordering {
    float: none !important;
    width: 100%;
  }

  body.sfa-catalog-grid-repaired .woocommerce-ordering select {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body.sfa-catalog-grid-repaired .site-main ul.products,
  body.sfa-catalog-grid-repaired.sfa-catalog-columns-4 .site-main ul.products,
  body.sfa-catalog-grid-repaired.sfa-catalog-columns-3 .site-main ul.products {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
