/* ==========================================================================
   RBT Products – Styles
   ========================================================================== */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --rbt-primary:    #cc0000;
  --rbt-primary-dk: #aa0000;
  --rbt-text:       #222222;
  --rbt-muted:      #666666;
  --rbt-border:     #dddddd;
  --rbt-bg-light:   #f7f7f7;
  --rbt-radius:     4px;
  --rbt-shadow:     0 2px 8px rgba(0,0,0,.10);
  --rbt-transition: .18s ease;
}

/* ── Utility ────────────────────────────────────────────────────────────── */
.rbt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55em 1.25em;
  border-radius: var(--rbt-radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background var(--rbt-transition), color var(--rbt-transition), border-color var(--rbt-transition);
}

.rbt-btn--primary {
  background: var(--rbt-primary);
  color: #fff;
  border-color: var(--rbt-primary);
}
.rbt-btn--primary:hover,
.rbt-btn--primary:focus {
  background: var(--rbt-primary-dk);
  border-color: var(--rbt-primary-dk);
}

.rbt-btn--outline {
  background: transparent;
  color: var(--rbt-primary);
  border-color: var(--rbt-primary);
}
.rbt-btn--outline:hover,
.rbt-btn--outline:focus {
  background: var(--rbt-primary);
  color: #fff;
}

.rbt-btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--rbt-primary);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.rbt-btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--rbt-muted);
  font-size: 1rem;
  padding: .2em .4em;
  border-radius: var(--rbt-radius);
  transition: color var(--rbt-transition);
}
.rbt-btn-icon:hover { color: var(--rbt-primary); }

.rbt-notice {
  padding: .75em 1em;
  border-radius: var(--rbt-radius);
  margin-bottom: 1.25em;
  font-weight: 500;
}
.rbt-notice--success { background: #d4edda; color: #155724; }
.rbt-notice--error   { background: #f8d7da; color: #721c24; }

/* ── Product list grid ──────────────────────────────────────────────────── */
.rbt-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.rbt-product-card {
  position: relative;
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--rbt-transition);
}
.rbt-product-card:hover { box-shadow: var(--rbt-shadow); }

.rbt-category-card {
  position: relative;
}

.rbt-new-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 5;
  display: inline-block;
  padding: .25em .7em;
  border-radius: 999px;
  background: var(--rbt-primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.rbt-product-card__image-link { display: block; }
.rbt-product-card__image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--rbt-bg-light);
  display: block;
}
.rbt-product-card__image--placeholder {
  height: 200px;
  background: var(--rbt-bg-light);
}

.rbt-product-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .5rem;
}

.rbt-product-card__title {
  font-size: 1rem;
  margin: 0;
  line-height: 1.3;
}
.rbt-product-card__title a { color: var(--rbt-text); text-decoration: none; }
.rbt-product-card__title a:hover { color: var(--rbt-primary); }

.rbt-product-card__meta {
  font-size: .85rem;
  color: var(--rbt-muted);
  margin: 0;
}

.rbt-compare-trigger {
  margin-left: auto;
}

.rbt-compare-check {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: var(--rbt-text);
  margin-top: .2rem;
}

.rbt-compare-check input {
  margin: 0;
}

.rbt-compare-actions {
  margin-top: 1rem;
}

.rbt-compare-notice {
  margin: .75rem 0 1rem;
  padding: .7rem .9rem;
  background: #fff4db;
  border: 1px solid #f1d48a;
  border-radius: var(--rbt-radius);
  color: #5f4a13;
  font-weight: 600;
}

.rbt-compare-wrap {
  margin-top: 1rem;
}

.rbt-compare-table {
  width: 100%;
  border-collapse: collapse;
}

.rbt-compare-table td,
.rbt-compare-table th {
  border: 1px solid var(--rbt-border);
  padding: .9rem 1rem;
  vertical-align: top;
}

.rbt-compare-table tr:first-child td {
  text-align: center;
}

.rbt-compare-intro,
.rbt-compare-row-label {
  width: 28%;
  font-weight: 700;
  color: #003a67;
}

.rbt-compare-table tr:nth-child(even) td {
  background: var(--rbt-bg-light);
}

.rbt-compare-table__image {
  max-width: 220px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto .75rem;
}

.rbt-compare-table__title {
  text-align: left;
  font-size: 1rem;
  line-height: 1.35;
}

.rbt-compare-table__title a {
  color: var(--rbt-text);
  text-decoration: none;
}

.rbt-compare-table__title a:hover {
  color: var(--rbt-primary);
}

/* ── Product detail layout ──────────────────────────────────────────────── */
.rbt-breadcrumb {
  font-size: .875rem;
  color: var(--rbt-muted);
  margin-bottom: 1.5rem;
}
.rbt-breadcrumb a { color: var(--rbt-muted); text-decoration: none; }
.rbt-breadcrumb a:hover { color: var(--rbt-primary); text-decoration: underline; }
.rbt-breadcrumb span { margin: 0 .35em; }

.rbt-product-detail__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .rbt-product-detail__layout { grid-template-columns: 1fr; }
}

.rbt-product-detail__image-wrap {
  position: sticky;
  top: 1.5rem;
  text-align: center;
}

.rbt-product-detail__main-image {
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
  border-radius: var(--rbt-radius);
  transition: opacity .2s ease;
}

.rbt-product-detail__thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin-top: .9rem;
}

.rbt-product-thumb {
  width: 68px;
  height: 68px;
  padding: 0;
  border: 2px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--rbt-transition), box-shadow var(--rbt-transition), transform var(--rbt-transition);
}

.rbt-product-thumb:hover,
.rbt-product-thumb:focus {
  border-color: var(--rbt-primary);
  box-shadow: 0 0 0 1px var(--rbt-primary);
  transform: translateY(-1px);
}

.rbt-product-thumb.is-active {
  border-color: var(--rbt-primary);
  box-shadow: 0 0 0 2px rgba(204, 0, 0, .2);
}

.rbt-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rbt-product-detail__title {
  font-size: 1.5rem;
  margin: 0 0 .3em;
  line-height: 1.25;
}

.rbt-product-detail__model {
  font-size: .95rem;
  color: var(--rbt-muted);
  margin: 0 0 1.5rem;
}

/* ── Attribute rows ─────────────────────────────────────────────────────── */
.rbt-product-detail__attributes { display: flex; flex-direction: column; gap: 1rem; }

.rbt-attribute-row { display: flex; flex-direction: column; gap: .35rem; }
.rbt-attribute-row--inline { flex-direction: row; align-items: center; gap: .5rem; }

.rbt-attribute-label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--rbt-text);
}

.rbt-select {
  padding: .45em .65em;
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  font-size: .95rem;
  background: #fff;
  cursor: pointer;
  max-width: 280px;
}
.rbt-select:focus { outline: 2px solid var(--rbt-primary); outline-offset: 2px; }

/* ── Color swatches ─────────────────────────────────────────────────────── */
.rbt-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .25rem;
}

.rbt-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform var(--rbt-transition), border-color var(--rbt-transition);
  padding: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.rbt-color-swatch:hover  { transform: scale(1.15); }
.rbt-color-swatch.is-active {
  border-color: var(--rbt-primary);
  box-shadow: 0 0 0 2px var(--rbt-primary);
  transform: scale(1.1);
}

.rbt-selected-color-label {
  font-size: .875rem;
  color: var(--rbt-muted);
  margin: .25rem 0 0;
}

/* ── Static attributes ──────────────────────────────────────────────────── */
.rbt-static-attributes {
  background: var(--rbt-bg-light);
  border-radius: var(--rbt-radius);
  padding: .75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .5rem;
}
.rbt-static-attr {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
}
.rbt-static-attr span { color: var(--rbt-muted); }
.rbt-static-attr strong { color: var(--rbt-text); font-weight: 600; }

/* ── Add to cart row ────────────────────────────────────────────────────── */
.rbt-add-to-cart-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rbt-border);
}

.rbt-qty-input {
  width: 70px;
  padding: .45em .5em;
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  font-size: .95rem;
  text-align: center;
}

.rbt-cart-message {
  font-size: .9rem;
  min-height: 1.4em;
  transition: color var(--rbt-transition);
  width: 100%;
}
.rbt-cart-message--success { color: #155724; }
.rbt-cart-message--error   { color: #721c24; }

.rbt-cart-link {
  display: inline-block;
  margin-top: .6rem;
  font-size: .9rem;
  color: var(--rbt-primary);
  text-decoration: underline;
}

/* ── Spec table ─────────────────────────────────────────────────────────── */
.rbt-product-detail__specs,
.rbt-product-detail__description,
.rbt-product-detail__related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rbt-border);
}

.rbt-product-detail__specs h3,
.rbt-product-detail__description h3,
.rbt-product-detail__related h3 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.rbt-table-wrap { overflow-x: auto; }

.rbt-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.rbt-spec-table th,
.rbt-spec-table td {
  padding: .55em .75em;
  border: 1px solid var(--rbt-border);
  text-align: left;
  white-space: nowrap;
}
.rbt-spec-table th {
  background: var(--rbt-bg-light);
  font-weight: 600;
}
.rbt-spec-table tr:nth-child(even) td { background: var(--rbt-bg-light); }

/* ── Related products ───────────────────────────────────────────────────── */
.rbt-product-detail__related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rbt-border);
}

.rbt-related-heading {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  font-weight: 700;
}

/* Reuse the catalog grid, capped at 4 columns */
.rbt-related-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin: 0;
  gap: .9rem;
}

.rbt-related-card {
  border-radius: 0;
  min-height: 280px;
}

.rbt-related-card__image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 210px;
  background: #fff;
}

.rbt-related-card .rbt-product-card__image,
.rbt-related-card .rbt-product-card__image--placeholder {
  height: 210px;
  background: #fff;
}

.rbt-related-card__body {
  background: #f8bc3b;
  padding: .85rem .65rem;
  min-height: 56px;
  justify-content: center;
}

.rbt-related-card .rbt-product-card__title {
  text-align: center;
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.rbt-related-card .rbt-product-card__title a {
  color: #072f4a;
}

.rbt-related-card .rbt-product-card__title a:hover {
  color: #072f4a;
  text-decoration: underline;
}

/* ── Cart page ──────────────────────────────────────────────────────────── */
.rbt-cart__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.rbt-cart__header h2 { margin: 0; }
.rbt-cart__user,
.rbt-cart__guest { font-size: .9rem; color: var(--rbt-muted); margin: 0; }

.rbt-cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
.rbt-cart-table th,
.rbt-cart-table td {
  padding: .65em .75em;
  border-bottom: 1px solid var(--rbt-border);
  vertical-align: middle;
}
.rbt-cart-table th { font-weight: 600; text-align: left; background: var(--rbt-bg-light); }

.rbt-cart-table__product {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.rbt-cart-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  flex-shrink: 0;
}
.rbt-cart-table__config span {
  display: inline-block;
  margin-right: .5em;
  font-size: .8rem;
  color: var(--rbt-muted);
}
.rbt-cart__empty { color: var(--rbt-muted); }

/* ── Request info form ──────────────────────────────────────────────────── */
.rbt-request-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--rbt-bg-light);
  border-radius: var(--rbt-radius);
  max-width: 560px;
}
.rbt-request-info h3 { margin: 0 0 .5rem; }

/* ── Registration form header/intro ─────────────────────────────────────── */
.rbt-registration-title {
  margin: 0 0 .4rem;
  font-size: 1.15rem;
}
.rbt-registration-intro {
  margin: 0 0 .2rem;
  font-size: .9rem;
  font-weight: 600;
}
.rbt-registration-required {
  margin: 0 0 1.25rem;
  font-size: .85rem;
  color: #cc0000;
}
.rbt-required-star {
  color: #cc0000;
  font-weight: 700;
}

/* ── Form sections (fieldsets) ──────────────────────────────────────────── */
.rbt-form__section {
  border: none;
  margin: 0 0 1rem;
  padding: 0;
  min-width: 0;
}
.rbt-form__section-title {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  color: var(--rbt-text);
  margin: 0 0 .75rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--rbt-border);
  width: 100%;
}

/* Full-width selects inside the registration form */
.rbt-form-select {
  padding: .5em .65em;
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  font-size: .95rem;
  background: #fff;
  cursor: pointer;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}
.rbt-form-select:focus { outline: 2px solid var(--rbt-primary); outline-offset: 2px; }

/* ── Checkbox rows ──────────────────────────────────────────────────────── */
.rbt-form__row--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
}
.rbt-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  cursor: pointer;
  font-weight: normal;
  font-size: .875rem;
  line-height: 1.45;
  max-width: 480px;
}
.rbt-checkbox-label input[type=checkbox] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: .18em;
  accent-color: var(--rbt-primary);
}
.rbt-checkbox-label a { color: var(--rbt-primary); }

/* ── Edit Profile bar (shown for HubSpot-registered users) ─────────────── */
.rbt-edit-profile-bar {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: var(--rbt-bg-light);
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.rbt-edit-profile-bar p {
  margin: 0;
  font-size: .9rem;
  color: var(--rbt-muted);
}

/* Privacy note */
.rbt-privacy-note {
  font-size: .8rem;
  color: var(--rbt-muted);
  margin: 0;
}

/* Create Account button – amber/gold accent */
.rbt-btn--create-account {
  background: var(--rbt-sidebar-active);
  color: #1a1a1a;
  border-color: var(--rbt-sidebar-active);
  font-weight: 700;
  font-size: 1rem;
  padding: .65em 1.75em;
}
.rbt-btn--create-account:hover,
.rbt-btn--create-account:focus {
  background: #c8930e;
  border-color: #c8930e;
  color: #fff;
}

/* ── Forms (shared) ─────────────────────────────────────────────────────── */
.rbt-form { display: flex; flex-direction: column; gap: .85rem; }

.rbt-form__row { display: flex; flex-direction: column; gap: .3rem; }
.rbt-form__row--actions { flex-direction: row; gap: .75rem; flex-wrap: wrap; align-items: center; }

.rbt-form label { font-weight: 600; font-size: .9rem; }

.rbt-form input[type=text],
.rbt-form input[type=email],
.rbt-form input[type=tel],
.rbt-form textarea {
  padding: .5em .65em;
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  font-size: .95rem;
  width: 100%;
  box-sizing: border-box;
  max-width: 480px;
}
.rbt-form input:focus,
.rbt-form textarea:focus {
  outline: 2px solid var(--rbt-primary);
  outline-offset: 2px;
}

/* ── Login page ─────────────────────────────────────────────────────────── */
.rbt-login {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}
.rbt-login__box {
  width: 100%;
  max-width: 440px;
}
.rbt-login__title { margin: 0 0 .5rem; font-size: 1.4rem; }
.rbt-login__intro { color: var(--rbt-muted); margin-bottom: 1.5rem; }
.rbt-login__note  { margin-top: 1.25rem; font-size: .875rem; color: var(--rbt-muted); }
.rbt-login__note a { color: var(--rbt-primary); }

/* ── No-products state ──────────────────────────────────────────────────── */
.rbt-no-products { color: var(--rbt-muted); padding: 1.5rem 0; }

/* ==========================================================================
   Catalog Archive Layout
   ========================================================================== */

/* ── Catalog page variables ─────────────────────────────────────────────── */
:root {
  --rbt-sidebar-header-bg: #1a2d42;
  --rbt-sidebar-active:    #e6a817;
  --rbt-sidebar-width:     260px;
}

/* ── Outer wrapper ──────────────────────────────────────────────────────── */
.rbt-catalog-page {
  width: 100%;
  margin: 0 auto;
}

/* ── Two-column layout ──────────────────────────────────────────────────── */
.rbt-catalog-layout {
  display: grid;
  grid-template-columns: var(--rbt-sidebar-width) 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 860px) {
  .rbt-catalog-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .rbt-catalog-sidebar {
    position: static !important;
    top: auto !important;
  }

  .rbt-sidebar-panel {
    overflow: visible !important;
  }
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.rbt-catalog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 1.5rem;
}

.rbt-sidebar-panel {
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  overflow: hidden;
}

.rbt-sidebar-panel__title {
  background: var(--rbt-sidebar-header-bg);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin: 0;
  padding: .7em 1em;
  line-height: 1.2;
  border-bottom: 4px solid var(--accent, #f0a800);
}

/* Category nav */
.rbt-sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rbt-sidebar-nav li {
  border-bottom: 1px solid var(--rbt-border);
}
.rbt-sidebar-nav li:last-child { border-bottom: none; }

.rbt-sidebar-nav li a {
  display: block;
  padding: .6em 1em;
  color: var(--rbt-text);
  text-decoration: none;
  font-size: .875rem;
  transition: color var(--rbt-transition), background var(--rbt-transition);
}
.rbt-sidebar-nav li a:hover {
  color: var(--rbt-primary);
  background: var(--rbt-bg-light);
}
.rbt-sidebar-nav li.is-active > a {
  color: var(--rbt-sidebar-active);
  font-weight: 700;
}
.rbt-sidebar-nav li.is-archive > a {
  color: var(--rbt-text);
  font-weight: 700;
}
/* Indented sub-items (categories under Search by Product) */
.rbt-sidebar-nav li.rbt-sidebar-nav__sub > a {
  padding-left: 1.75em;
  font-size: .8rem;
  color: #555;
  border-bottom: none;
}

/* ── Filter form (Narrow Results) ───────────────────────────────────────── */
.rbt-filter-form { padding: 0; }

.rbt-filter-group {
  border-bottom: 1px solid var(--rbt-border);
}
.rbt-filter-group:last-of-type { border-bottom: none; }

/* <summary> styled as a section header */
.rbt-filter-group__title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--rbt-text);
  cursor: pointer;
  padding: .65em 1em;
  margin: 0;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .45em;
}
.rbt-filter-group__title::-webkit-details-marker { display: none; }
.rbt-filter-group__title::before {
  content: '▾';
  font-size: .65rem;
  transition: transform var(--rbt-transition);
  display: inline-block;
}
details.rbt-filter-group:not([open]) .rbt-filter-group__title::before {
  transform: rotate(-90deg);
}

.rbt-filter-group__options {
  padding: .25rem 1rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  max-height: 210px;
  overflow-y: auto;
}

@media (max-width: 860px) {
  .rbt-filter-group__options {
    max-height: none;
    overflow-y: visible;
  }
}

.rbt-filter-check {
  display: flex;
  align-items: flex-start;
  gap: .45em;
  font-size: .85rem;
  color: var(--rbt-text);
  cursor: pointer;
  line-height: 1.4;
}
.rbt-filter-check input[type="checkbox"] {
  margin-top: .15em;
  flex-shrink: 0;
  accent-color: var(--rbt-primary);
}
.rbt-filter-count { color: var(--rbt-muted); }

.rbt-filter-actions {
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--rbt-border);
}

/* ── Catalog main area ──────────────────────────────────────────────────── */
.rbt-catalog-title {
  font-size: 1.75rem;
  margin: .4rem 0 .75rem;
  line-height: 1.2;
}

.rbt-catalog-description {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--rbt-text);
  margin-bottom: 1.5rem;
}

/* Override breadcrumb spacing inside catalog */
.rbt-catalog-main .rbt-breadcrumb {
  margin-bottom: .5rem;
}
.rbt-catalog-main .rbt-breadcrumb .rbt-breadcrumb__current {
  color: var(--rbt-sidebar-active);
  font-weight: 600;
  margin: 0;
}

/* ── Toolbar ────────────────────────────────────────────────────────────── */
.rbt-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .6rem .9rem;
  background: var(--rbt-bg-light);
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  margin-bottom: 1.25rem;
}

.rbt-catalog-count {
  font-size: .85rem;
  color: var(--rbt-muted);
}

.rbt-sort-form {
  display: flex;
  align-items: center;
}

.rbt-sort-label {
  display: flex;
  align-items: center;
  gap: .5em;
  font-size: .85rem;
  color: var(--rbt-text);
  white-space: nowrap;
}

.rbt-select--sm {
  font-size: .85rem;
  padding: .3em .55em;
}

/* ── Catalog grid (fixed 3 cols) ────────────────────────────────────────── */
.rbt-catalog-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0;
}

@media (max-width: 1100px) {
  .rbt-catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .rbt-catalog-grid { grid-template-columns: 1fr; }
}

/* ── Smaller button variant ─────────────────────────────────────────────── */
.rbt-btn--sm {
  padding: .35em .85em;
  font-size: .85rem;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.rbt-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rbt-border);
}

.rbt-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  height: 2.2em;
  padding: 0 .5em;
  border: 1px solid var(--rbt-border);
  border-radius: var(--rbt-radius);
  font-size: .875rem;
  color: var(--rbt-text);
  text-decoration: none;
  transition: background var(--rbt-transition), color var(--rbt-transition), border-color var(--rbt-transition);
}
.rbt-pagination .page-numbers:hover,
.rbt-pagination .page-numbers.current {
  background: var(--rbt-primary);
  color: #fff;
  border-color: var(--rbt-primary);
}
.rbt-pagination .page-numbers.dots {
  border-color: transparent;
  background: none;
  cursor: default;
}

/* ==========================================================================
   Caster Arrangement Modal
   ========================================================================== */

/* ── "See Caster Patterns" button (inline in label) ────────────────────── */
.rbt-caster-help-btn {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  margin-left: .6em;
  padding: .2em .6em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--rbt-primary);
  background: transparent;
  border: 1px solid var(--rbt-primary);
  border-radius: 999px;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1.4;
  transition: background var(--rbt-transition), color var(--rbt-transition);
  white-space: nowrap;
}
.rbt-caster-help-btn::before {
  content: 'ⓘ';
  font-style: normal;
}
.rbt-caster-help-btn:hover {
  background: var(--rbt-primary);
  color: #fff;
}

/* ── Modal overlay ──────────────────────────────────────────────────────── */
.rbt-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.rbt-modal.is-open { display: flex; align-items: center; justify-content: center; }

.rbt-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

body.rbt-modal-open { overflow: hidden; }

/* ── Modal dialog ───────────────────────────────────────────────────────── */
.rbt-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: var(--rbt-radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  padding: 1.75rem 2rem;
  max-width: 860px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.rbt-modal__close {
  position: absolute;
  top: .75rem;
  right: .85rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--rbt-muted);
  padding: .2em .4em;
  border-radius: var(--rbt-radius);
  transition: color var(--rbt-transition);
}
.rbt-modal__close:hover { color: var(--rbt-primary); }

.rbt-modal__title {
  margin: 0 0 .25rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rbt-modal__subtitle {
  font-size: .875rem;
  color: var(--rbt-muted);
  margin: 0 0 1.5rem;
}

/* ── Caster patterns row ────────────────────────────────────────────────── */
.rbt-caster-patterns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
}

.rbt-caster-pattern {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 110px;
  text-align: center;
}

.rbt-caster-pattern__name {
  margin: .35rem 0 0;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.rbt-caster-pattern__desc {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rbt-text);
}

.rbt-caster-pattern__note {
  margin: 0;
  font-size: .72rem;
  font-style: italic;
  color: var(--rbt-muted);
  line-height: 1.3;
}

/* ── Caster grid: shared ────────────────────────────────────────────────── */
.rbt-caster-grid {
  display: grid;
  gap: 5px;
  border: 2px solid #333;
  padding: 6px;
  background: #fff;
}

/* S = swivel, R = rigid, empty = placeholder */
.rbt-cp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 2px solid #444;
  border-radius: 4px;
  font-weight: 700;
  font-size: .85rem;
  font-family: sans-serif;
}
.rbt-cp--s { background: #fff;   color: #333; }
.rbt-cp--r { background: #fff;   color: #333; }
.rbt-cp--empty {
  border-color: transparent;
  background: transparent;
}

/* ── 2×2 (Patterns A & C) ───────────────────────────────────────────────── */
.rbt-caster-grid--2x2 {
  grid-template-columns: repeat(2, 30px);
  grid-template-rows:    repeat(2, 30px);
}

/* ── 3×3 diamond (Pattern D) ────────────────────────────────────────────── */
.rbt-caster-grid--diamond {
  grid-template-columns: repeat(3, 30px);
  grid-template-rows:    repeat(3, 30px);
}

/* ── 3×2 (Pattern E) ────────────────────────────────────────────────────── */
.rbt-caster-grid--3x2 {
  grid-template-columns: repeat(3, 30px);
  grid-template-rows:    repeat(2, 30px);
}

/* ── Empty box (Pattern N) ──────────────────────────────────────────────── */
.rbt-caster-grid--empty {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rbt-caster-grid__empty-label {
  font-size: .7rem;
  color: var(--rbt-muted);
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 600px) {
  .rbt-caster-patterns { gap: 1rem; }
  .rbt-caster-pattern  { min-width: 90px; }
  .rbt-modal__dialog   { padding: 1.25rem; }
}

/* ==========================================================================
   Catalog Landing — Category Grid
   ========================================================================== */
.rbt-sidebar-count {
  font-size: 0.85em;
  color: #888;
  margin-left: 2px;
}

.rbt-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.rbt-category-card {
  border: 1px solid #dde2e8;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.rbt-category-card:hover {
  box-shadow: 0 3px 14px rgba(0,0,0,0.15);
}

.rbt-category-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Image area + gold banner sit inside a relative container */
.rbt-category-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  overflow: hidden;
}

.rbt-category-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 10px;
  transition: transform 0.3s ease;
}

.rbt-category-card:hover .rbt-category-card__image {
  transform: scale(1.04);
}

.rbt-category-card__image--placeholder {
  width: 100%;
  height: 100%;
  background: #eaedf0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 24 24' fill='none' stroke='%23aab0bb' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") center / 60px no-repeat;
}

/* Gold banner pinned to the bottom of the image area */
.rbt-category-card__banner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent, #f0a800);
  padding: 0.55rem 0.5rem;
  text-align: center;
}

.rbt-category-card__banner span {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--contrast-2, #0a3d62);
  line-height: 1.25;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .rbt-category-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .rbt-category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .rbt-category-grid { grid-template-columns: 1fr; }
}


