/* ==========================================
   RIDE RITE MASTER STYLESHEET
   v3
   Layout + Sidebar + Cards + Typography + States
========================================== */

/* --------------------------
   TOKENS
-------------------------- */
:root {
  --rr-color-page: #E1E2DC;
  --rr-color-surface: rgba(255, 255, 255, 0.65);
  --rr-color-text: #111111;
  --rr-color-pill-dark: #15393d;
  --rr-color-pill-muted: #cfcfcb;
  --rr-color-pill-muted-text: #ffffff;

  --rr-space-xs: 4px;
  --rr-space-sm: 8px;
  --rr-space-md: 12px;
  --rr-space-lg: 20px;
  --rr-space-xl: 32px;

  --rr-radius-md: 12px;
  --rr-radius-lg: 18px;
  --rr-radius-pill: 999px;

  --rr-shadow-card: 0 2px 10px rgba(0, 0, 0, 0.06);
  --rr-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.10);

  --rr-transition-fast: 160ms ease;
}

/* --------------------------
   PAGE / LAYOUT
-------------------------- */
body {
  background: var(--rr-color-page);
}

.rr-layout {
  color: var(--rr-color-text);
  gap: 32px;
}

.rr-top-nav {
  margin-bottom: var(--rr-space-xl);
}

.rr-sidebar > * + * {
  margin-top: 16px;
}

.rr-grid {
  row-gap: 28px;
}

/* --------------------------
   SIDEBAR
-------------------------- */
.rr-sidebar {
  max-width: 260px;
  width: 100%;
  margin-top: 18px;
}

.rr-sidebar-card label {
  display: block;
  margin-bottom: 6px;
}

.rr-sidebar-card {
  background: var(--rr-color-surface);
  border-radius: var(--rr-radius-md);
  box-shadow: var(--rr-shadow-card);
  padding: var(--rr-space-md);
}

.rr-sidebar-title {
  font-family: "Rock Salt", cursive;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--rr-color-text);
  margin-bottom: var(--rr-space-sm);
}

.rr-clear-filters {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.6;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  display: inline-block;
}

.rr-clear-filters:hover {
  opacity: 1;
  border-color: rgba(0,0,0,0.4);
}

/* --------------------------
   CARD
-------------------------- */
.rr-card {
  background: var(--rr-color-surface);
  border-radius: var(--rr-radius-lg);
  box-shadow: var(--rr-shadow-card);
  padding: var(--rr-space-md);
  color: var(--rr-color-text);
  border: 1px solid rgba(0,0,0,0.04);

  display: flex;
  flex-direction: column;
  min-height: 340px;
  height: 100%;

  transition:
    transform var(--rr-transition-fast),
    box-shadow var(--rr-transition-fast),
    opacity var(--rr-transition-fast);
}

/* Optional if the whole card is linked */
a.rr-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.rr-card__top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rr-card__bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
}

/* --------------------------
   CARD TYPOGRAPHY
-------------------------- */
.rr-location {
  font-family: "Rock Salt", cursive;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  opacity: 0.6;
  color: var(--rr-color-text);
}

.rr-course {
  font-family: "DM Sans", sans-serif;
  font-size: 38px;
  line-height: 1.05;
  font-weight: 700;
  color: #000000;
}

.rr-days {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 400;
  color: #000000;
  opacity: 1;
}

/* --------------------------
   PILLS
-------------------------- */
.rr-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: var(--rr-radius-pill);
  padding: 6px 12px;
}

.rr-pill--date {
  background: var(--rr-color-pill-dark);
  color: #ffffff;
}

.rr-pill--soldout {
  background: var(--rr-color-pill-muted);
  color: var(--rr-color-pill-muted-text);
}

.rr-pill--date,
.rr-pill--soldout {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 600;
}

/* --------------------------
   CARD STATES
-------------------------- */
.instock .rr-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rr-shadow-hover);
}

.outofstock .rr-card {
  opacity: 0.75;
  transform: none !important;
  box-shadow: var(--rr-shadow-card) !important;
}

.outofstock a.rr-card {
  pointer-events: none;
  cursor: default;
}

.instock .rr-pill--soldout {
  display: none;
}

/* --------------------------
   UTILITIES
-------------------------- */
.rr-stack-xs > * + * {
  margin-top: 6px;
}

.rr-stack-sm > * + * {
  margin-top: var(--rr-space-sm);
}

.rr-stack-md > * + * {
  margin-top: var(--rr-space-md);
}