/* Alismail Resources Manager v1.2 — Steelcase-style */

body.arm-resources-page.arm-no-sidebar .site-content .content-area,
body.arm-resources-page.arm-no-sidebar #primary,
body.arm-resources-page.arm-no-sidebar .content-area {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.arm-resources-page.arm-no-sidebar #secondary,
body.arm-resources-page.arm-no-sidebar .sidebar,
body.arm-resources-page.arm-no-sidebar aside.widget-area {
  display: none !important;
}

body.arm-resources-page .site-main,
body.arm-resources-page #content,
body.arm-resources-page .site-content,
body.arm-resources-page #main,
body.arm-resources-page #primary,
body.arm-resources-page .content-area,
body.arm-resources-page #bwp-main .container,
body.arm-resources-page .elementor-section-wrap {
  padding-top: 0 !important;
  margin-top: 0 !important;
  max-width: 100% !important;
}

body.arm-resources-page #arm-archive-main,
body.arm-resources-page .arm-archive-main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.arm-resources-page .arm-hero-slider {
  margin-top: 0 !important;
}

body.arm-resources-page .page-header,
body.arm-resources-page .entry-header,
body.arm-resources-page .page-title,
body.arm-resources-page .breadcrumb,
body.arm-resources-page .funori-breadcrumb {
  display: none !important;
}

/* Match the theme header height to the rest of the site (funori adds
   header-normal padding:30px 0 which makes this page's header taller). */
body.arm-resources-page .bwp-header .header-normal {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.arm-lightbox-open,
body.arm-popup-open {
  overflow: hidden;
}

.arm-archive-main,
.arm-single-main {
  max-width: none;
  margin: 0;
  padding: 0;
}

.arm-archive-inner,
.arm-single-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px max(20px, calc((100vw - 1440px) / 2 + 20px)) 56px;
}

/* Hero — OFS-style full bleed, image edge-to-edge right */
.arm-hero-slider {
  position: relative;
  width: 100vw;
  margin: 0;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  background: #fff;
}

.arm-hero-slide-inner {
  display: grid;
  grid-template-columns: minmax(300px, 42%) 1fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
  max-width: none;
  min-height: 0;
  height: 170px;
}

.arm-hero-text {
  font-size: 15px;
  line-height: 1.6;
  padding: 28px 36px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #F7F5F3;
  background-repeat: no-repeat;
}

.arm-hero-image {
  min-height: 0;
  height: 100%;
}

.arm-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.arm-hero-prev,
.arm-hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 22px;
  z-index: 2;
}

.arm-hero-prev { left: 8px; }
.arm-hero-next { right: 8px; }

/* Type nav — full width, left aligned */
.arm-type-nav-wrap {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #fbfbfb;
  border: none;
}

.arm-type-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
  margin: 0;
  max-width: none;
  width: 100%;
  background: transparent !important;
  border: none !important;
}

.arm-type-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  color: #222;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

a.arm-type-nav-item:hover {
  color: #000;
}

.arm-type-nav-item.is-active {
  border-bottom-color: #000;
}

.arm-type-nav-logo {
  max-height: 44px;
  width: auto;
  flex-shrink: 0;
}

.arm-loading {
  padding: 24px;
  color: #666;
}

/* Archive grid — Steelcase-style cards */
.arm-archive-grid {
  display: grid;
  grid-template-columns: repeat(var(--arm-cols, 4), minmax(0, 1fr));
  gap: 24px;
}

/* Product material tab — compact 6-up grid */
.arm-product-colors-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1400px) {
  .arm-product-colors-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .arm-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .arm-product-colors-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .arm-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arm-product-colors-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .arm-hero-slide-inner { grid-template-columns: 1fr; padding: 20px; height: auto; }
}

@media (max-width: 600px) {
  .arm-archive-grid,
  .arm-product-colors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.arm-resource-card {
  background: #fff;
  transition: box-shadow 0.2s ease;
}

.arm-resource-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.arm-card-permalink {
  display: block;
  color: inherit;
  text-decoration: none;
}

.arm-card-image-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f4f4f4;
}

.arm-card-main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arm-card-body {
  padding: 12px 4px 8px;
}

.arm-card-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.arm-card-subtitle {
  margin: 0;
  font-size: 12px;
  color: #666;
  line-height: 1.35;
}

.arm-card-swatch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 8px 2px 4px;
}

.arm-swatch-btn {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: none;
  cursor: pointer;
  padding: 0;
  background-color: #ddd;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.arm-swatch-btn.is-active,
.arm-swatch-btn:hover {
  box-shadow: 0 0 0 1px #fff, 0 0 0 2px #000;
}

.arm-swatch-more {
  font-size: 10px;
  font-weight: 700;
  color: #555;
  padding: 0 2px;
}

.arm-card-brand-logo {
  display: block;
  max-height: 22px;
  width: auto;
  margin: 4px 2px 2px;
}

/* Manufacturer (left) + Grade (right) in one row — keeps card height unchanged */
.arm-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 2px 2px;
}

.arm-card-meta-row .arm-card-brand-logo {
  margin: 0;
}

.arm-card-grade-logo {
  display: block;
  max-height: 22px;
  width: auto;
  margin-left: auto;
  flex-shrink: 0;
}

.arm-card-color-count {
  margin: 0;
  padding: 2px 2px 8px;
  font-size: 10px;
  color: #767676;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Compact cards on product material tab */
.arm-resource-card--compact .arm-card-body {
  padding: 8px 2px 4px;
}

.arm-resource-card--compact .arm-card-title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.arm-resource-card--compact .arm-card-subtitle {
  font-size: 10px;
}

.arm-resource-card--compact .arm-card-swatch-row {
  gap: 4px;
  padding: 6px 2px 2px;
}

.arm-resource-card--compact .arm-swatch-btn {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  flex: 0 0 12px;
}

.arm-resource-card--compact .arm-card-brand-logo {
  max-height: 16px;
  margin: 2px 2px 0;
}

.arm-resource-card--compact .arm-card-color-count {
  font-size: 9px;
  padding-bottom: 4px;
}

/* Single resource */
.arm-single-resource {
  margin: 16px 0;
}

.arm-single-grid {
  display: grid;
  grid-template-columns: minmax(340px, 46%) 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .arm-single-grid { grid-template-columns: 1fr; gap: 28px; }
}

.arm-single-visual {
  max-width: 520px;
}

.arm-single-image-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.arm-single-main-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f5f5f5;
}

.arm-single-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.arm-single-swatch-grid .arm-swatch-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  flex: 0 0 28px;
}

.arm-single-brand-logo,
.arm-single-collection-logo {
  display: block;
  max-height: 32px;
  width: auto;
  margin-top: 16px;
}

.arm-single-title {
  margin: 0 0 20px;
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  font-weight: 700;
}

.arm-single-panel {
  min-width: 0;
}

.arm-theme-black .arm-data-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border-bottom: 1px solid #d9d9d9;
  margin-bottom: 4px;
  width: 100%;
}

.arm-theme-black .arm-data-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: #333;
  margin-bottom: -1px;
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  text-align: center;
}

.arm-theme-black .arm-data-tab.is-active {
  border-bottom-color: #000;
  color: #000;
}

.arm-theme-black .arm-data-panels {
  border: none;
}

.arm-data-panels {
  padding: 12px 0 0;
}

/* Steelcase-style spec table — labels plain left, values with top rule only */
.arm-spec-table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

.arm-spec-table th,
.arm-spec-table td {
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  background: transparent;
  border: none;
}

.arm-spec-table th {
  width: 32%;
  padding: 16px 20px 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.arm-spec-table td {
  width: 68%;
  padding: 16px 0;
  font-size: 14px;
  color: #333;
  border-top: 1px solid #d4d4d4;
  white-space: pre-wrap;
  word-break: break-word;
}

.arm-spec-table tr:first-child td {
  border-top: 1px solid #d4d4d4;
}

.arm-panel-empty {
  margin: 0;
  padding: 18px 14px;
  color: #666;
  font-style: italic;
}

.arm-source-block {
  padding: 18px 14px;
}

.arm-source-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.arm-source-logo {
  max-width: 120px;
  height: auto;
  display: block;
  margin-top: 10px;
}

.arm-source-description {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #333;
  max-width: 100%;
}

.arm-source-description p {
  margin: 0 0 0.75em;
}

.arm-single-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.arm-single-title-wrap {
  flex: 1;
  min-width: 0;
}

.arm-single-title-row .arm-single-title {
  margin: 0 0 4px;
}

.arm-single-desc-line {
  margin: 0 0 2px;
  font-size: 13px;
  color: #555;
  line-height: 1.45;
}

.arm-single-grade-logo {
  max-height: 48px;
  width: auto;
  flex-shrink: 0;
}

.arm-single-color-name {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
}

.arm-single-photo-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #555;
  text-align: center;
}

.arm-related-materials {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
  grid-column: 1 / -1;
}

.arm-related-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.arm-related-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.arm-related-card {
  flex: 0 0 120px;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.arm-related-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  margin-bottom: 6px;
}

.arm-related-card span {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  display: block;
}

.arm-single-resource--popup .arm-related-materials {
  margin-top: 24px;
}

.arm-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

@media (max-width: 720px) {
  .arm-docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.arm-doc-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  background: #fff;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.arm-doc-card:hover {
  border-color: #000;
}

.arm-doc-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/4;
  background: #f3f3f3;
  overflow: hidden;
}

.arm-doc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arm-doc-pdf-icon {
  font-size: 18px;
  font-weight: 700;
  color: #c00;
}

.arm-doc-title {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Lightbox zoom */
.arm-lightbox,
.arm-lightbox--global {
  position: fixed;
  inset: 0;
  z-index: 100010;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.arm-lightbox[hidden] {
  display: none !important;
}

.arm-lightbox-stage {
  max-width: 96vw;
  max-height: 92vh;
  overflow: auto;
  cursor: zoom-in;
}

.arm-lightbox-image {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  transition: transform 0.2s ease;
  transform-origin: center center;
}

.arm-lightbox.is-zoomed .arm-lightbox-stage {
  cursor: zoom-out;
}

.arm-lightbox.is-zoomed .arm-lightbox-image {
  transform: scale(2);
  max-width: none;
  max-height: none;
}

.arm-lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  z-index: 2;
}

/* PDF modal */
.arm-pdf-modal,
.arm-pdf-modal--global {
  position: fixed;
  inset: 0;
  z-index: 100011;
}

.arm-pdf-modal[hidden] {
  display: none !important;
}

.arm-pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.arm-pdf-modal-dialog {
  position: relative;
  width: min(92vw, 960px);
  height: min(88vh, 720px);
  margin: 5vh auto 0;
  background: #fff;
}

.arm-pdf-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.arm-pdf-modal-close {
  position: absolute;
  top: -36px;
  right: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.arm-empty {
  color: #666;
  font-style: italic;
}

/* Product card popup trigger */
.arm-card-popup-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

/* Product color popup modal */
.arm-color-popup {
  position: fixed;
  inset: 0;
  z-index: 99995;
}

.arm-color-popup[hidden] {
  display: none !important;
}

.arm-color-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.arm-color-popup-dialog {
  position: relative;
  width: min(98vw, 1320px);
  max-height: 94vh;
  margin: 3vh auto 0;
  background: #fff;
  overflow: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.arm-color-popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 3;
  border: 0;
  background: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.arm-color-popup-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfbfb;
  border-bottom: 1px solid #e8e8e8;
}

.arm-color-popup-nav .arm-type-nav-wrap {
  width: 100%;
  margin: 0;
}

.arm-color-popup-nav .arm-type-nav {
  padding: 0 16px;
}

.arm-color-popup-nav .arm-type-nav-logo {
  max-height: 22px;
  width: auto;
  flex-shrink: 0;
}

.arm-popup-collection-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 12px;
  border-top: 1px solid #eee;
}

.arm-popup-collection-pill {
  border: 1px solid #ccc;
  background: #fff;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
}

.arm-popup-collection-pill.is-active {
  border-color: #000;
  background: #000;
  color: #fff;
}

.arm-color-popup-body {
  padding: 20px 20px 28px;
}

.arm-single-resource--popup .arm-single-grid {
  gap: 32px;
  grid-template-columns: minmax(300px, 42%) 1fr;
}

.arm-single-resource--popup .arm-single-title {
  font-size: 1.75rem;
}

/* Product material submenus */
.arm-material-submenu-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 20px;
  border-bottom: 1px solid #e0e0e0;
}

.arm-material-submenu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: #333;
}

.arm-material-submenu-btn.is-active {
  border-bottom-color: #000;
  color: #000;
}

.arm-material-submenu-logo {
  max-height: 22px;
  width: auto;
  flex-shrink: 0;
}

.arm-product-colors-panel {
  display: none;
}

.arm-product-colors-panel.is-active {
  display: block;
}

.arm-hero-slide {
  display: none;
}

.arm-hero-slide.is-active {
  display: block;
}
