/********** The Garage — Industrial Workshop **********/

:root {
  --garage-bg: #141414;
  --garage-charcoal: #1a1a1a;
  --garage-amber: #e8a020;
  --garage-amber-soft: rgba(232, 160, 32, 0.25);
  --garage-metal: rgba(255, 255, 255, 0.06);
  --garage-text: #e5e5e5;
  --garage-muted: rgba(255, 255, 255, 0.5);
}

body.garage-page {
  background: var(--garage-bg);
}

.garage-section {
  position: relative;
  background:
    linear-gradient(180deg, var(--garage-charcoal) 0%, var(--garage-bg) 100%);
  color: var(--garage-text);
  overflow-x: clip;
  z-index: 2;
}

.garage-blueprint {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(232, 160, 32, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 160, 32, 0.3) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.garage-blueprint::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(232, 160, 32, 0.06), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ccircle cx='60' cy='60' r='50' fill='none' stroke='%23e8a020' stroke-width='0.5' opacity='0.3'/%3E%3Ccircle cx='60' cy='60' r='35' fill='none' stroke='%23e8a020' stroke-width='0.5' opacity='0.2'/%3E%3C/svg%3E") repeat;
  opacity: 0.5;
}

.garage-inner {
  position: relative;
  z-index: 1;
}

/* Workshop decorative tools & gears */
.garage-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.garage-gear {
  position: absolute;
  color: rgba(232, 160, 32, 0.1);
}

.garage-gear--1 {
  width: 120px;
  height: 120px;
  top: 10%;
  right: 5%;
  animation: garageSpin 28s linear infinite;
}

.garage-gear--2 {
  width: 70px;
  height: 70px;
  bottom: 25%;
  left: 3%;
  animation: garageSpinReverse 20s linear infinite;
}

.garage-deco-tool {
  position: absolute;
  color: rgba(232, 160, 32, 0.09);
}

.garage-deco-tool--1 { top: 30%; right: 15%; font-size: 2.5rem; transform: rotate(-25deg); }
.garage-deco-tool--2 { bottom: 15%; right: 22%; font-size: 2rem; transform: rotate(15deg); }
.garage-deco-tool--3 { top: 55%; left: 8%; font-size: 2.8rem; animation: garageSpin 30s linear infinite; }

@keyframes garageSpin {
  to { transform: rotate(360deg); }
}

@keyframes garageSpinReverse {
  to { transform: rotate(-360deg); }
}

/* Compact workshop header */
.garage-pagehead {
  position: relative;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid rgba(232, 160, 32, 0.15);
}

.garage-metal-edge {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--garage-amber), #8b6914);
}

.garage-pagehead__plate {
  position: relative;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(40, 40, 40, 0.9) 0%, rgba(26, 26, 26, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 24px rgba(0, 0, 0, 0.35);
}

.garage-pagehead__rivets {
  position: absolute;
  inset: 8px;
  pointer-events: none;
}

.garage-pagehead__rivets span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #666, #333);
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.garage-pagehead__rivets span:nth-child(1) { top: 0; left: 0; }
.garage-pagehead__rivets span:nth-child(2) { top: 0; right: 0; }
.garage-pagehead__rivets span:nth-child(3) { bottom: 0; left: 0; }
.garage-pagehead__rivets span:nth-child(4) { bottom: 0; right: 0; }

.garage-pagehead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.garage-pagehead__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.garage-pagehead__icon-wrap {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
  border: 1px solid rgba(232, 160, 32, 0.35);
  color: var(--garage-amber);
  font-size: 1.25rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.garage-pagehead__label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--garage-amber);
  opacity: 0.85;
  margin-bottom: 0.15rem;
}

.garage-pagehead__title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin: 0;
  color: #f0f0f0;
}

.garage-pagehead__tagline {
  font-size: 0.88rem;
  color: var(--garage-muted);
  margin: 0.15rem 0 0;
}

.garage-pagehead__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.garage-pagehead__badges span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(232, 160, 32, 0.2);
  border-radius: 3px;
}

.garage-pagehead__badges i {
  color: var(--garage-amber);
  font-size: 0.75rem;
}

/* Toolbar */
.garage-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 160, 32, 0.1);
}

.garage-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.garage-filter {
  padding: 0.45rem 1rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: var(--garage-muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.garage-filter:hover {
  border-color: var(--garage-amber);
  color: var(--garage-amber);
  box-shadow: inset 0 0 20px rgba(232, 160, 32, 0.08);
}

.garage-filter.is-active {
  background: linear-gradient(180deg, rgba(232, 160, 32, 0.2) 0%, rgba(232, 160, 32, 0.08) 100%);
  border-color: var(--garage-amber);
  color: var(--garage-amber);
}

/* Feed layouts */
.garage-feed--list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem 0 2rem;
}

.garage-feed--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 1.5rem;
  padding: 1rem 0 2rem;
}

/* List card */
.garage-list-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.garage-list-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.garage-list-card__inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1e1e 0%, #141414 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.garage-list-card__inner:hover {
  border-color: rgba(232, 160, 32, 0.35);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 0 24px rgba(232, 160, 32, 0.1);
  transform: translateY(-3px);
  color: inherit;
}

.garage-list-card__media {
  overflow: hidden;
}

.garage-list-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
  transition: transform 0.28s ease;
}

.garage-list-card__inner:hover .garage-list-card__media img {
  transform: scale(1.05);
}

.garage-list-card__content {
  flex: 1;
  position: relative;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.garage-list-card__title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f5f5f5;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.garage-list-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  position: relative;
  z-index: 1;
}

.garage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.garage-pill i { font-size: 0.55rem; }

.garage-pill--date {
  background: rgba(232, 160, 32, 0.12);
  border-color: rgba(232, 160, 32, 0.28);
  color: var(--garage-amber);
}

.garage-pill--tag {
  background: rgba(255, 255, 255, 0.04);
}

.garage-pill--status.garage-status--completed {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
  color: #81c784;
}

.garage-pill--status.garage-status--in-progress {
  background: rgba(232, 160, 32, 0.15);
  border-color: rgba(232, 160, 32, 0.3);
  color: var(--garage-amber);
}

.garage-pill--status.garage-status--testing {
  background: rgba(100, 149, 237, 0.15);
  border-color: rgba(100, 149, 237, 0.3);
  color: #90caf9;
}

.garage-pill--status.garage-status--prototype {
  border-style: dashed;
  color: var(--garage-muted);
}

.garage-list-card__excerpt {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--garage-muted);
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.garage-list-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.65rem 1.35rem;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--garage-amber) 0%, #c48818 100%);
  color: #1a1a1a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s ease;
}

.garage-list-card__inner:hover .garage-list-card__cta {
  box-shadow: 0 0 24px rgba(232, 160, 32, 0.4);
}

/* Grid card */
.garage-grid-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #222 0%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.garage-grid-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.garage-grid-card:hover {
  border-color: rgba(232, 160, 32, 0.3);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4);
  transform: translateY(-6px);
  color: inherit;
}

.garage-grid-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.garage-grid-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.garage-grid-card:hover .garage-grid-card__media img {
  transform: scale(1.05);
}

.garage-grid-card__media .garage-status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.garage-grid-card__body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.garage-grid-card__body h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #f5f5f5;
  margin: 0.35rem 0 0.5rem;
  line-height: 1.35;
}

.garage-grid-card__body p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--garage-muted);
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.garage-grid-card__meta {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.garage-category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--garage-amber);
}

.garage-status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.garage-status--completed {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.garage-status--in-progress {
  background: rgba(232, 160, 32, 0.2);
  color: var(--garage-amber);
  border: 1px solid rgba(232, 160, 32, 0.35);
  animation: garagePulse 2.5s ease-in-out infinite;
}

.garage-status--testing {
  background: rgba(100, 149, 237, 0.2);
  color: #90caf9;
  border: 1px solid rgba(100, 149, 237, 0.3);
}

.garage-status--prototype {
  background: transparent;
  color: var(--garage-muted);
  border: 1px dashed rgba(255, 255, 255, 0.25);
}

@keyframes garagePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.garage-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--garage-muted);
}

.garage-load-more {
  text-align: center;
  padding: 1rem 0 4rem;
}

.garage-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--garage-amber);
  background: linear-gradient(180deg, rgba(232, 160, 32, 0.15) 0%, rgba(232, 160, 32, 0.05) 100%);
  color: var(--garage-amber);
  font-family: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.garage-btn:hover {
  color: #fff;
  background: var(--garage-amber);
  box-shadow: 0 4px 20px rgba(232, 160, 32, 0.3);
}

.garage-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 767.98px) {
  .garage-feed--grid {
    grid-template-columns: 1fr;
  }

  .garage-pagehead__badges {
    width: 100%;
  }

  .garage-gear--1 { width: 80px; height: 80px; }
}

@media (max-width: 575.98px) {
  .garage-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }

  .garage-filters::-webkit-scrollbar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .garage-status--in-progress,
  .garage-gear,
  .garage-deco-tool--3 {
    animation: none;
  }

  .garage-list-card,
  .garage-grid-card {
    opacity: 1;
    transform: none;
  }
}
