/* =============================================================
   OneCare All Devices — scoped styles
   Primary accent: #1565C0 (OneCare Blue)
   All selectors are prefixed .ocad- to avoid theme collisions.
   ============================================================= */

.ocad-section {
  --ocad-accent: #1565C0;
  --ocad-accent-hover: #0D4C9A;
  --ocad-accent-ink: #0D3C7A;
  --ocad-accent-soft: #E8F1FB;
  --ocad-accent-tint: #D2E3F7;
  --ocad-accent-border: #B6D3F2;
  --ocad-slate: #1C1C1C;
  --ocad-text: #1F2937;
  --ocad-muted: #6B7280;
  --ocad-border: #E5E7EB;
  --ocad-radius: 16px;

  box-sizing: border-box;
  width: 100%;
  padding: 48px 0 80px;
  background: #ffffff;
  border-bottom: 1px solid var(--ocad-border);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ocad-text);
  -webkit-font-smoothing: antialiased;
}

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

.ocad-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
.ocad-header {
  max-width: 640px;
  margin-bottom: 40px;
}

.ocad-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--ocad-accent-soft);
  border: 1px solid var(--ocad-accent-border);
  color: var(--ocad-accent-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ocad-eyebrow svg {
  width: 14px;
  height: 14px;
  color: var(--ocad-accent);
}

.ocad-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ocad-slate);
}

.ocad-intro {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ocad-muted);
}

/* ---- Category Tabs ---- */
.ocad-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.ocad-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--ocad-border);
  background: #ffffff;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.ocad-tab:hover {
  border-color: var(--ocad-accent);
  color: var(--ocad-accent-ink);
}

.ocad-tab:focus-visible {
  outline: 2px solid var(--ocad-accent);
  outline-offset: 2px;
}

.ocad-tab.is-active {
  background: var(--ocad-accent);
  border-color: var(--ocad-accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(21, 101, 192, 0.25);
}

.ocad-tab-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  color: var(--ocad-accent);
}

.ocad-tab.is-active .ocad-tab-icon svg {
  color: #ffffff;
}

.ocad-tab-count {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  background: #f3f4f6;
  color: #6b7280;
}

.ocad-tab.is-active .ocad-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ---- Count Row ---- */
.ocad-countrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ocad-border);
}

.ocad-countrow-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ocad-slate);
}

.ocad-countrow-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ocad-countrow-total {
  font-size: 12px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color: var(--ocad-muted);
  white-space: nowrap;
}

.ocad-countrow-total strong {
  color: var(--ocad-slate);
}

/* Header Arrows (in countrow) */
.ocad-header-arrows {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ocad-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--ocad-border);
  color: var(--ocad-accent);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.ocad-arrow-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.ocad-arrow-btn:hover:not(:disabled):not(.is-disabled) {
  background: var(--ocad-accent);
  border-color: var(--ocad-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.25);
}

.ocad-arrow-btn:disabled,
.ocad-arrow-btn.is-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  color: #94a3b8;
  background: #f8fafc;
  pointer-events: none;
}

.ocad-header-arrows.is-hidden {
  display: none !important;
}

/* ---- Carousel Container & Viewport ---- */
.ocad-carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.ocad-carousel-viewport {
  flex: 1;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  padding: 12px 4px 20px;
  margin: -12px -4px -20px;
}

.ocad-carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  width: 100%;
}

/* Side Arrows (Left & Right flanking the cards) */
.ocad-side-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid var(--ocad-border);
  color: var(--ocad-accent);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 2;
}

.ocad-side-arrow svg {
  width: 22px;
  height: 22px;
  display: block;
}

.ocad-side-arrow:hover:not(:disabled):not(.is-disabled) {
  background: var(--ocad-accent);
  border-color: var(--ocad-accent);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(21, 101, 192, 0.3);
  transform: scale(1.06);
}

.ocad-side-arrow:active:not(:disabled):not(.is-disabled) {
  transform: scale(0.96);
}

.ocad-side-arrow:disabled,
.ocad-side-arrow.is-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
  box-shadow: none;
  pointer-events: none;
}

.ocad-side-arrow.is-hidden {
  display: none !important;
}

@media (max-width: 639px) {
  .ocad-side-arrow {
    display: none !important;
  }
  .ocad-carousel-container {
    gap: 0;
  }
}

/* ---- Device Card ---- */
.ocad-card {
  flex: 0 0 calc((100% - 48px) / 3);
  width: calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--ocad-radius);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

@media (max-width: 1023px) and (min-width: 640px) {
  .ocad-card {
    flex: 0 0 calc((100% - 24px) / 2);
    width: calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
}

@media (max-width: 639px) {
  .ocad-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
}

.ocad-card:hover {
  border-color: var(--ocad-accent);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.1);
}

.ocad-card.is-hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ocad-card { animation: none; }
}

.ocad-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 224px;
  padding: 24px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  overflow: hidden;
}

.ocad-card-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.ocad-card:hover .ocad-card-media img {
  transform: scale(1.05);
}

.ocad-card-brand {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--ocad-slate);
  color: #ffffff;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ocad-card-type {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid var(--ocad-border);
  color: #6b7280;
  font-size: 10px;
  font-weight: 600;
}

.ocad-card-body {
  padding: 24px;
}

.ocad-card-name {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ocad-slate);
  transition: color 0.2s ease;
}

.ocad-card:hover .ocad-card-name {
  color: var(--ocad-accent-ink);
}

.ocad-card-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Links to the single RPM Device page */
.ocad-card-media-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.ocad-section .ocad-card-name-link {
  color: inherit;
  text-decoration: none;
}

.ocad-section .ocad-card-name-link:hover,
.ocad-section .ocad-card-name-link:focus-visible {
  color: var(--ocad-accent);
  text-decoration: underline;
}

.ocad-section .ocad-card-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ocad-accent);
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.ocad-section .ocad-card-more svg {
  width: 14px;
  height: 14px;
}

.ocad-section .ocad-card-more:hover,
.ocad-section .ocad-card-more:focus-visible {
  color: var(--ocad-accent-hover);
  gap: 8px;
}

.ocad-section .ocad-card-name-link:focus-visible,
.ocad-section .ocad-card-more:focus-visible {
  outline: 2px solid var(--ocad-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.ocad-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 24px;
  background: rgba(249, 250, 251, 0.7);
  border-top: 1px solid #f3f4f6;
}

.ocad-card-footer-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.ocad-card-unit {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ocad-accent-ink);
  background: var(--ocad-accent-soft);
  border: 1px solid var(--ocad-accent-border);
  padding: 2px 10px;
  border-radius: 6px;
  text-align: right;
}

/* ---- Empty State ---- */
.ocad-empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  color: var(--ocad-muted);
  font-size: 14px;
}

/* ---- Full-page wrapper spacing ---- */
.ocad-page-wrapper .ocad-section {
  padding-top: 48px;
}
