/* Equipment Archive Styles */
/* ========================================
   EQUIPMENT ARCHIVE - Premium Industrial Design
   ======================================== */

/* FEATURED EQUIPMENT SECTION */
.equipment-featured {
  padding: clamp(80px, 10vw, 120px) 0;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.equipment-featured__header {
  max-width: 1400px;
  margin: 0 auto clamp(48px, 6vw, 72px);
  padding: 0 var(--gutter, 24px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.equipment-featured__header-main {
  flex: 1;
}

.equipment-featured__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display-en, sans-serif);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--subpage-accent, #1e40af);
  margin-bottom: 16px;
}

.equipment-featured__label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--subpage-accent, #1e40af);
}

.equipment-featured__title {
  font-family: var(--font-serif, serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-text-strong, #0f172a);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Grid Layout */
.equipment-featured__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2vw, 24px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
}

@media (min-width: 768px) {
  .equipment-featured__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .equipment-featured__grid[data-count="1"] {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto 0 var(--gutter, 24px);
  }
}

@media (min-width: 1024px) {
  .equipment-featured__grid[data-count="1"] {
    margin-left: calc((100% - 1400px) / 2 + var(--gutter, 24px));
  }

  .equipment-featured__grid[data-count="4"],
  .equipment-featured__grid[data-count="5"],
  .equipment-featured__grid[data-count="6"] {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Item Card - Full Image Focus */
.equipment-featured__item {
  position: relative;
  overflow: hidden;
  background: #1a1f2e;
}

/* Image Area - Full Card */
.equipment-featured__media {
  position: relative;
  width: 100%;
  min-height: 300px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

@media (min-width: 768px) {
  .equipment-featured__media {
    aspect-ratio: 3 / 2;
  }
}

.equipment-featured__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.equipment-featured__item:hover .equipment-featured__img {
  transform: scale(1.05);
}

/* Minimal overlay - only at bottom for text */
.equipment-featured__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 50%,
    rgba(10, 15, 26, 0.5) 75%,
    rgba(10, 15, 26, 0.85) 100%
  );
  pointer-events: none;
}

/* Content Area - Overlay on image */
.equipment-featured__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(16px, 2.5vw, 24px);
  z-index: 2;
}

.equipment-featured__name {
  font-family: var(--font-serif, serif);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.equipment-featured__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  font-size: clamp(0.75rem, 1vw, 0.85rem);
}

.equipment-featured__maker {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.equipment-featured__model {
  font-family: var(--font-body-en, sans-serif);
  letter-spacing: 0.02em;
  color: #93c5fd;
}

.equipment-featured__specs {
  margin: 8px 0 0;
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

/* Hover border effect */
.equipment-featured__item::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  z-index: 3;
  pointer-events: none;
  transition: border-color 0.3s ease;
}

.equipment-featured__item:hover::before {
  border-color: #3b82f6;
}

/* ========================================
   EQUIPMENT LIST SECTION
   ======================================== */
.equipment-list {
  padding: clamp(64px, 8vw, 100px) 0;
  background: var(--subpage-surface, #f8fafc);
}

.equipment-list__header {
  max-width: 1200px;
  margin: 0 auto clamp(40px, 5vw, 56px);
  padding: 0 var(--gutter, 24px);
}

.equipment-list__label {
  display: block;
  font-family: var(--font-display-en, sans-serif);
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--subpage-accent, #1e40af);
  margin-bottom: 12px;
}

.equipment-list__title {
  font-family: var(--font-serif, serif);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--color-text-strong, #0f172a);
  margin: 0;
  position: relative;
  display: inline-block;
}

.equipment-list__title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--subpage-accent, #1e40af);
}

/* Category Block */
.equipment-list__category {
  max-width: 1200px;
  margin: 0 auto clamp(48px, 6vw, 64px);
  padding: 0 var(--gutter, 24px);
}

.equipment-list__category-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-serif, serif);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text-strong, #0f172a);
  margin: 0 0 clamp(20px, 3vw, 28px);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--subpage-accent, #1e40af);
}

.equipment-list__category-icon {
  display: block;
  width: 4px;
  height: 24px;
  background: var(--subpage-accent, #1e40af);
}

/* Table */
.equipment-list__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.equipment-list__table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.equipment-list__table thead {
  background: var(--subpage-dark, #0f172a);
}

.equipment-list__table thead th {
  padding: clamp(14px, 2vw, 18px) clamp(12px, 2vw, 18px);
  font-family: var(--font-body-en, sans-serif);
  font-size: clamp(0.75rem, 1.1vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.equipment-list__table thead th:last-child {
  border-right: none;
}

.equipment-list__table tbody tr {
  transition: background 0.2s ease;
}

.equipment-list__table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.equipment-list__table tbody tr:hover {
  background: rgba(30, 64, 175, 0.04);
}

.equipment-list__table tbody td {
  padding: clamp(14px, 2vw, 18px) clamp(12px, 2vw, 18px);
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  line-height: 1.6;
  color: var(--color-text-subtle, #475569);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: top;
}

.equipment-list__table tbody td:first-child {
  font-weight: 600;
  color: var(--color-text-strong, #0f172a);
}

.equipment-list__table tbody tr:last-child td {
  border-bottom: none;
}

.equipment-list__empty {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
  color: var(--color-text-muted, #94a3b8);
}

/* 研削盤カテゴリ用テーブル（設備名なし、4列） */
.equipment-list__table--grinding {
  min-width: 600px;
}

.equipment-list__table--grinding th:last-child,
.equipment-list__table--grinding td:last-child {
  width: 80px;
  text-align: center;
}

.equipment-list__specs-wide {
  white-space: pre-line;
  line-height: 1.8;
}

/* Responsive Table */
@media (max-width: 768px) {
  .equipment-list__table {
    min-width: 100%;
  }

  .equipment-list__table thead {
    display: none;
  }

  .equipment-list__table tbody tr {
    display: block;
    padding: clamp(16px, 3vw, 20px);
    margin-bottom: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  .equipment-list__table tbody tr:nth-child(even) {
    background: #ffffff;
  }

  .equipment-list__table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .equipment-list__table tbody td::before {
    content: attr(data-label);
    flex-shrink: 0;
    width: 80px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--subpage-accent, #1e40af);
  }

  .equipment-list__table tbody td:first-child {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--subpage-accent, #1e40af);
  }

  .equipment-list__table tbody td:first-child::before {
    display: none;
  }

  .equipment-list__table tbody td:last-child {
    border-bottom: none;
  }

  /* 研削盤カテゴリ用テーブル（モバイル） */
  .equipment-list__table--grinding {
    min-width: 100%;
  }

  .equipment-list__table--grinding tbody td:first-child {
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--subpage-accent, #1e40af);
  }

  .equipment-list__table--grinding tbody td:first-child::before {
    display: none;
  }
}

/* ========================================
   SINGLE EQUIPMENT PAGE
   ======================================== */
.single-equipment h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 0 clamp(16px, 2vw, 24px);
  position: relative;
  display: inline-block;
}

.single-equipment h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 80px;
  height: 4px;
  background: #0f172a;
}

.single-equipment .term-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(24px, 3vw, 32px);
}

.single-equipment .term-badge {
  display: inline-block;
  padding: 6px 16px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.single-equipment .entry-content img {
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-equipment .section--share {
  margin: clamp(32px, 4vw, 48px) 0;
}

.single-equipment .share-tools {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 20px) clamp(32px, 5vw, 80px);
  border: 1px solid #d1d5db;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 24px);
}

.single-equipment .share-tools__label {
  font-weight: 700;
  font-size: 0.875rem;
  color: #1f2937;
}

.single-equipment .share-tools__btn {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
}

.single-equipment .share-tools__btn:hover {
  border-color: #0f172a;
  background: #f9fafb;
}

.single-equipment .share-tools__btn--x {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.single-equipment .section--related {
  background: #f9fafb;
  padding: clamp(48px, 6vw, 72px) 0;
  border-top: 1px solid #e5e7eb;
}

.single-equipment .section--related .section__title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  color: #0f172a;
}

.single-equipment .related-group__head {
  padding-bottom: 12px;
  border-bottom: 2px solid #0f172a;
}

.single-equipment .related-group .card-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.single-equipment .related-group .card-list figure {
  margin: 0 !important;
}

.single-equipment .related-group .card-list .card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 16px;
  padding: 12px;
  box-shadow: none;
}

.single-equipment .related-group .card-list .card:hover {
  border-color: #0f172a;
  transform: none;
}

.single-equipment .related-group .card-list .card__media {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px;
  margin: 0 !important;
}

.single-equipment .related-group .card-list .card__media img {
  display: block;
  transform: none !important;
}

.single-equipment .related-group .card-list .card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  text-shadow: none;
}

.single-equipment .related-group .card-list .card__excerpt {
  display: none !important;
}

@media (max-width: 640px) {
  .single-equipment .share-tools {
    flex-direction: column;
  }

  .single-equipment .related-group .card-list .card {
    flex-direction: column !important;
  }

  .single-equipment .related-group .card-list .card__media {
    width: 100% !important;
    height: 140px !important;
  }
}
