/* APERA Catalog 2/3/4/6 Grid Locks, Mobile Coupon Strip, Sibling Swatches & OOS Shield (`--apera-red: #C81E1E`) */
#product-list:not(.product-list) { --bs-gutter-x: 10px; --bs-gutter-y: 10px; }
@media (max-width: 767.98px) {
  #product-list:not(.product-list) > .col { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  #product-list:not(.product-list) > .col { flex: 0 0 auto; width: 33.333333%; }
}
@media (min-width: 1300px) and (max-width: 1739.98px) {
  .apera-cat-master-grid:not(.is-full) #product-list:not(.product-list) > .col { flex: 0 0 auto; width: 25%; }
}
@media (min-width: 1700px) {
  .apera-cat-master-grid:not(.is-full) #product-list:not(.product-list) > .col,
  #product-list:not(.product-list).row-cols-lg-4 > .col,
  .row.apera-product-grid > .col { flex: 0 0 auto; width: 16.666667%; }
}

/* Mobile Compact Category Banner & Single-Row Horizontal Coupon Strip (<= 50px) */
@media (max-width: 991.98px) {
  .apera-cstrip { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; margin-bottom: 10px; }
  .apera-cstrip-lead { font-size: 12.5px; }
  .apera-cstrip-ico { width: 24px; height: 24px; }
  .apera-cstrip-list { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 6px; padding-bottom: 2px; }
  .apera-cstrip-list::-webkit-scrollbar { display: none; }
  .apera-cstrip-pill { padding: 4px 9px; gap: 6px; font-size: 12px; white-space: nowrap; }
}
@media (max-width: 767.98px) {
  .apera-cat-banner { margin-bottom: 8px; }
  .apera-cat-banner-top { padding: 8px 12px; }
  .apera-cat-banner-badge { font-size: 10.5px; padding: 2px 8px; margin-bottom: 3px; }
  .apera-cat-banner-title { font-size: 17px; margin-bottom: 2px; }
  .apera-cat-banner-sub { -webkit-line-clamp: 1; font-size: 12px; }
  .apera-cat-banner-strip { padding: 6px 10px; }
  .apera-cat-mob-bar { margin-bottom: 8px; }
  .apera-cat-quick-bar { margin-bottom: 6px; }
  .apera-page-head { padding: 10px 14px; margin-bottom: 10px; }
}

/* Search Criteria Collapsible & Fitment Banner */
.apera-search-criteria-details > summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 8px 14px;
  border: 1px solid #CBD5E1; border-radius: 10px; background: #F8FAFC;
  font-weight: 700; font-size: 13.5px; color: #0F172A;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.apera-search-criteria-details > summary::-webkit-details-marker { display: none; }
.apera-search-criteria-details[open] > summary { margin-bottom: 10px; border-color: var(--apera-red, #C81E1E); background: #FEF2F2; color: #991B1B; }
.apera-fitment-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF; border-radius: 12px; padding: 12px 16px; margin-bottom: 12px;
}
.apera-fitment-hero strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.apera-fitment-hero p { margin: 0; font-size: 12.5px; color: #CBD5E1; }

/* Card Signals & Out-of-Stock Shield */
.apera-card-signal.is-dark { background: #1E293B; color: #FFFFFF; border: 1px solid #0F172A; }
.apera-stock-pill.is-out { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }

/* Centralized Sibling Card Swatch Dots & Size Pills (replaces per-card inline <style>) */
.apera-card-variants {
  --apera-red: #C81E1E; --apera-dark: #0F172A; --apera-border: #94A3B8;
  min-height: 44px; display: flex; align-items: center; flex-wrap: wrap;
  gap: 0; margin: 0 0 2px; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
}
.apera-card-dot {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; border-radius: 999px; flex-shrink: 0; box-sizing: border-box; position: relative;
}
.apera-card-dot:first-child { margin-left: -13px; }
.apera-card-dot:focus-visible { outline: 2px solid #2563EB; outline-offset: 1px; }
.apera-card-dot-circle {
  width: 18px; height: 18px; border-radius: 999px; display: block; box-sizing: border-box; position: relative;
  border: 1px solid rgba(15, 23, 42, 0.14); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.apera-card-dot-circle.has-border { border: 1px solid var(--apera-border); }
.apera-card-dot:hover .apera-card-dot-circle { transform: scale(1.12); }
.apera-card-dot.is-active .apera-card-dot-circle { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px var(--apera-red); }
.apera-card-dot.is-out .apera-card-dot-circle { opacity: 0.55; }
.apera-card-dot.is-out .apera-card-dot-circle::after {
  content: ""; position: absolute; top: 50%; left: 1px; right: 1px; height: 1.5px;
  background: #475569; transform: translateY(-50%) rotate(-45deg); border-radius: 1px;
}
.apera-card-extra {
  display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700;
  color: #334155; background: #F1F5F9; border: 1px solid #CBD5E1; border-radius: 999px; padding: 2px 6px; line-height: 1.2;
}
.apera-card-summary { font-size: 12px; font-weight: 500; color: #475569; line-height: 1.25; margin-left: 2px; white-space: nowrap; }
.apera-card-size-pill {
  min-height: 44px; min-width: 44px; max-width: 100%; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.25;
  color: #1E3A8A; background: #EFF6FF; border: 1px solid #BFDBFE; text-decoration: none; box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.apera-card-size-pill:hover { color: #1E3A8A; background: #DBEAFE; border-color: #93C5FD; text-decoration: none; }
.apera-card-size-pill:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
.apera-card-size-pill svg { flex-shrink: 0; }

/* Centralized PDP Sibling Swatches (replaces <style id="apera-sibling-swatches-css">) */
.apera-sibling-swatches {
  --apera-red: #C81E1E; --apera-dark: #0F172A; --apera-border: #CBD5E1; --apera-radius: 8px;
  padding: 10px 12px; border-radius: var(--apera-radius); border: 1px solid #E2E8F0; background: #F8FAFC;
  width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
}
.apera-sibling-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.35; color: var(--apera-dark); }
.apera-sibling-axis { font-weight: 500; color: #475569; min-width: 0; overflow-wrap: anywhere; }
.apera-sibling-current { font-weight: 700; color: var(--apera-dark); }
.apera-sibling-count { font-size: 12px; font-weight: 600; color: #475569; white-space: nowrap; flex-shrink: 0; }
.apera-sibling-list { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.apera-swatch-item {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; min-width: 112px; max-width: 100%;
  padding: 6px 11px; border-radius: var(--apera-radius); border: 1px solid var(--apera-border); background: #FFFFFF;
  color: var(--apera-dark); text-decoration: none; box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.apera-swatch-item.is-size { min-width: 88px; min-height: 48px; }
.apera-swatch-item:hover { border-color: #64748B; background: #FFFFFF; color: var(--apera-dark); text-decoration: none; box-shadow: 0 2px 5px rgba(15, 23, 42, 0.07); }
.apera-swatch-item:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
.apera-swatch-item.is-out { border: 1px dashed #64748B; background: #FFFFFF; opacity: 0.72; }
.apera-swatch-item.is-active { padding: 5px 22px 5px 10px; border: 2px solid var(--apera-red); background: #FFF5F5; box-shadow: 0 1px 3px rgba(200, 30, 30, 0.12); }
.apera-swatch-item.is-active:hover { border-color: var(--apera-red); background: #FFF5F5; }
.apera-swatch-check {
  position: absolute; top: 4px; right: 4px; width: 15px; height: 15px; border-radius: 999px;
  background: var(--apera-red); display: inline-flex; align-items: center; justify-content: center; pointer-events: none;
}
.apera-swatch-img { width: 40px; height: 40px; aspect-ratio: 1 / 1; object-fit: contain; flex-shrink: 0; border-radius: 5px; background: #FFFFFF; border: 1px solid #F1F5F9; display: block; }
.apera-swatch-item.is-out .apera-swatch-img { opacity: 0.55; filter: grayscale(35%); }
.apera-swatch-meta { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; flex: 1 1 auto; }
.apera-swatch-top { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.apera-swatch-dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; display: inline-block; box-sizing: border-box; border: 1px solid rgba(15, 23, 42, 0.12); }
.apera-swatch-dot.has-border { border: 1px solid #CBD5E1; }
.apera-swatch-label { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--apera-dark); overflow-wrap: anywhere; word-break: break-word; }
.apera-swatch-item.is-out .apera-swatch-label { color: #475569; text-decoration: line-through; }
.apera-swatch-sub { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; line-height: 1.2; }
.apera-swatch-price { font-size: 11.5px; font-weight: 500; color: #475569; white-space: nowrap; }
.apera-swatch-badge { display: inline-block; font-size: 10.5px; font-weight: 600; line-height: 1.2; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.apera-swatch-badge.is-low { color: #9A3412; background: #FFEDD5; border: 1px solid #FED7AA; }
.apera-swatch-badge.is-out-badge { color: #475569; background: #FFFFFF; border: 1px dashed #64748B; }
@media (max-width: 767.98px) {
  .apera-sibling-swatches { padding: 6px 8px; margin-bottom: 6px !important; }
  .apera-sibling-header { margin-bottom: 4px; font-size: 12.5px; }
  .apera-sibling-list { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .apera-sibling-list::-webkit-scrollbar { display: none; }
  .apera-swatch-item, .apera-swatch-item.is-size { flex: 0 0 auto; min-height: 46px; }
}

/* A11y >= 98 WCAG AA Contrast & >= 44x44px Tap Targets */
.text-danger { color: #B91C1C !important; }
.apera-discount-badge { background: #C81E1E; }
.apera-card-cat-link { color: #475569; }
.apera-refine-pill { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; }
#information-order-tracking .form-control,
#information-order-tracking .btn,
#information-easy-return .form-control,
#information-easy-return .btn { min-height: 44px; }
