/* ---------------------------
   Cards / Grid
---------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 16px 0 0;
  align-items: stretch;
}

/* Ensure all cards in grid have equal height */
.grid .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sectionFeatured,
.sectionWhat {
  margin-top: 0;
}

.whatGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.whatItem {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.whatLabel {
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.whatItem p {
  font-size: 14px;
  line-height: 1.6;
}

.featuredGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 18px;
}

.featuredMain {
  height: 100%;
}

.featuredSide {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
}

/* Make primary latest image taller */
.sectionFeatured .featuredMain .cover-product {
  height: 474px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px; /* squarer */
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  transition: var(--t);
  display: flex;
  flex-direction: column;
}

/* Transparent cards on gear and collect pages - elegant design for transparent images */
.gearGrid .card,
.collectGrid .card,
.sectionGear .card,
body.category-gear .card,
body.category-gear .grid .card {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02) !important;
  overflow: hidden;
}

.gearGrid .card:hover,
.collectGrid .card:hover,
.sectionGear .card:hover,
body.category-gear .card:hover,
body.category-gear .grid .card:hover {
  box-shadow: var(--shadow) !important;
  transform: translateY(-1px);
}

/* Content area - transparent background, no blur */
.gearGrid .card .content,
.collectGrid .card .content,
.sectionGear .card .content,
body.category-gear .card .content,
body.category-gear .grid .card .content {
  background: transparent !important;
  border-radius: 0;
  margin-top: 0;
  padding-top: 14px;
  position: relative;
  z-index: 1;
}

/* Image area - no background, let transparency show through, fit height */
.gearGrid .card .cover,
.collectGrid .card .cover,
.sectionGear .card .cover,
body.category-gear .card .cover,
body.category-gear .grid .card .cover {
  background: transparent !important;
  border-radius: 12px 12px 0 0;
  position: relative;
  z-index: 0;
  height: 220px !important;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: transparent !important;
}

.gearGrid .card .cover img,
.collectGrid .card .cover img,
.sectionGear .card .cover img,
body.category-gear .card .cover img,
body.category-gear .grid .card .cover img {
  width: auto;
  min-height: 220px;
  max-width: 100%;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.cover {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface-2);
  flex-shrink: 0; /* Prevent image from shrinking */
}

.cover-product {
  height: 220px;
}

.cover-article {
  height: 150px;
}

/* Gear category cards in discover grid and featured section: height-based, fit full height */
/* This is for the discover page and latest section only, not the gear page */
/* Keep same height as cover-article (150px), just change object-fit */
.grid .card .cover-gear,
.sectionFeatured .card .cover-gear {
  height: 150px !important; /* Same height as cover-article */
  flex-shrink: 0 !important; /* Prevent shrinking */
  object-fit: contain !important; /* Fit height, adjust width */
  object-position: center !important;
  background: transparent !important;
}

/* Featured main card gear images - keep 474px height but use contain */
.sectionFeatured .featuredMain .cover-gear {
  height: 474px !important; /* Keep same height as featured main */
  object-fit: contain !important; /* Fit height, adjust width */
}

.content {
  padding: 14px 14px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allow flex shrinking */
}

/* Ensure content areas are consistent height across all cards */
.grid .card .content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

/* Lucide icons in meta section - thicker strokes and proper alignment */
.meta [data-lucide] {
  stroke-width: 2.5;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.meta-divider,
.meta-divider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.view-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.view-count > i {
  flex-shrink: 0;
}

.view-number {
  font-weight: 800;
  font-size: 13px;
  padding-left: 5px;
}

.view-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tag {
  color: var(--text);
  background: rgba(208, 122, 92, 0.14);
  border: 1px solid rgba(208, 122, 92, 0.42);
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.cardTitle {
  margin: 10px 0 6px;
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--text-heading);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  min-height: 2.6em; /* reserve space for up to 2 lines */
}

.card .content p {
  overflow: hidden;
  min-height: 3em; /* reserve space for up to 2 lines */
  max-height: 3em;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
