/* Robot card + grid styles */

.robot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(0.85rem, 0.6rem + 0.4vw, 1.25rem);
  align-items: stretch;
}

.robot-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.robot-item {
  height: 100%;
}

.robot-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 0.85rem + 0.35vw, 1.2rem);
  box-shadow: var(--shadow-outer);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
}

.robot-card__accent {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top right, rgba(0, 0, 0, 0.04), transparent 55%);
  pointer-events: none;
}

.robot-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.robot-card__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-inner);
}

.robot-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.robot-chip {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--sand-100);
  color: var(--sand-700);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.favorite-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--sand-50);
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    box-shadow 120ms ease,
    background 120ms ease;
}

.favorite-toggle svg {
  width: 18px;
  height: 18px;
  fill: var(--sand-500);
}

.favorite-toggle.is-active {
  background: var(--rose-500);
  box-shadow: none;
}

.favorite-toggle.is-active svg {
  fill: #fff;
}

.robot-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  flex: 1;
}

.robot-card__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.robot-card__intro {
  align-items: center;
  width: 100%;
  justify-content: flex-start;
}

.robot-avatar {
  width: 64px;
  height: 64px;
  border-radius: 24px;
  background: var(--sand-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-inner);
}

.robot-card__body h3 {
  margin: 0.15rem 0 0.4rem;
  font-size: 1.35rem;
}

.robot-eyebrow {
  font-size: 0.85rem;
  color: var(--sand-700);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0;
}

.robot-summary {
  margin: 0;
  color: var(--sand-700);
  font-size: 0.95rem;
  max-width: 32ch;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.robot-meta,
.robot-specs {
  display: grid;
  gap: var(--space-2);
  position: relative;
  z-index: 1;
}

.robot-meta {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 1rem;
}

.robot-specs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sand-700);
  margin-bottom: 0.25rem;
}

.meta-value {
  font-size: 1rem;
  color: var(--sand-900);
  margin: 0;
  display: flex;
  flex-direction: column;
}

.robot-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: var(--space-3);
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.price-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sand-900);
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--lavender-500), var(--mint-500));
  color: var(--sand-900);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}

.ghost-link {
  background: transparent;
  border: none;
  color: var(--sand-700);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
}

.ghost-link--muted {
  color: var(--sand-500);
}

.robot-grid-item {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-outer);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.robot-grid-item-image {
  height: 200px;
  background: var(--sand-100);
  overflow: hidden;
}

.robot-grid-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .robot-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .robot-specs {
    grid-template-columns: minmax(0, 1fr);
  }
}
