/* ============================================
   ORDER CATALOG PAGE VARIABLES
   (mirrors /distributors values; scoped to .cat-section)
   ============================================ */
.cat-section {
  --font-primary: "soleil", sans-serif;
  --color-text: #333;
  --color-rule: #333;
  --page-inset: 167px;
  --content-max-width: calc(100% - (var(--page-inset) * 2));

  --card-width: 277px;
  --card-bg: #ffffff;
  --card-border: #e8e8e8;
  --card-shadow: 0 2px 14px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 8px 32px rgba(0,0,0,0.13);
  --card-radius: 6px;
  --card-img-height: 200px;
  --accent: #333;
  --label-bg: #f5f5f5;
}

.cat-section *,
.cat-section *::before,
.cat-section *::after {
  box-sizing: border-box;
}

/* ============================================
   SHARED SECTION LAYOUT
   ============================================ */
.cat-section {
  padding-top: 30px;
  padding-bottom: 40px;
  margin-left: auto;
  margin-right: auto;
  max-width: var(--content-max-width);
}

.cat-section h2 {
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 44px;
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: 28px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.cat-section h2::before,
.cat-section h2::after {
  content: '';
  flex: 0 0 80px;
  height: 1px;
  background-color: var(--color-rule);
}

.cat-divider {
  max-width: var(--content-max-width);
  margin: 10px auto 0;
  border: none;
  border-top: 1px solid #e0e0e0;
}

/* ============================================
   CARD GRID
   ============================================ */
.cat-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.cat-grid + .cat-grid {
  margin-top: 20px;
}

.cat-card {
  flex: 0 0 var(--card-width);
  width: var(--card-width);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 22px 24px;
  transition: box-shadow 0.28s ease, transform 0.28s ease;
}

.cat-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.cat-card-img-wrap {
  width: 100%;
  height: var(--card-img-height);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.cat-card-img-wrap img {
  max-width: 100%;
  max-height: var(--card-img-height);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.cat-card-rule {
  width: 32px;
  height: 1px;
  background: #ddd;
  margin: 0 auto 18px;
}

.cat-section .cat-card-title {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
  text-align: center;
  margin: 0 0 4px;
}

/* margin-top:auto pins the buttons to the card bottom so rows align */
.cat-card-actions {
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============================================
   BUTTONS (matches a.dist-card-btn)
   ============================================ */
.cat-section a.cat-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 14px;
  background: var(--label-bg);
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cat-section a.cat-card-btn:hover,
.cat-section a.cat-card-btn:focus {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}

.cat-btn-icon {
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.cat-section a.cat-card-btn:hover .cat-btn-icon,
.cat-section a.cat-card-btn:focus .cat-btn-icon {
  opacity: 1;
  stroke: #fff;
}

/* ============================================
   RESPONSIVE (same breakpoints as /distributors)
   ============================================ */
@media (max-width: 768px) {
  .cat-section {
    max-width: calc(100% - 8px);
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 18px;
    padding-bottom: 28px;
  }
  .cat-section h2 {
    font-size: 28px;
    gap: 12px;
  }
  .cat-section h2::before,
  .cat-section h2::after {
    flex: 0 0 40px;
  }
  .cat-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 320px;
  }
}
