.section--equipment {
  padding: 70px 0;
  background: #f8fafc;
  color: var(--text);
}

.section--equipment .section__head {
  margin-bottom: 20px;
}

/* ─── Filters ─────────────────────────────────────── */

.equipment__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.equipment__filter-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.equipment__filter-btn:hover {
  border-color: rgba(247, 197, 30, 0.55);
}

.equipment__filter-btn.is-active {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(247, 197, 30, 0.32);
}

/* ─── Subfilters ───────────────────────────────────── */

.equipment__subfilters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}

.equipment__subfilters[hidden] {
  display: none !important;
}

.equipment__subfilter-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  white-space: nowrap;
}

.equipment__subfilter-btn:hover {
  border-color: rgba(247, 197, 30, 0.4);
}

.equipment__subfilter-btn.is-active {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(247, 197, 30, 0.24);
}

/* ─── Meta / count ────────────────────────────────── */

.equipment__meta {
  margin-bottom: 14px;
  min-height: 20px;
}

.equipment__count {
  font-size: 14px;
  color: var(--muted);
}

/* ─── Grid ────────────────────────────────────────── */

.equipment__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* ─── Card ────────────────────────────────────────── */

.equipment-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.equipment-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.11);
  transform: translateY(-2px);
}

.equipment-card.is-hidden {
  display: none !important;
}

/* ─── Card media ──────────────────────────────────── */

.equipment-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.04);
  cursor: pointer;
  flex-shrink: 0;
}

.equipment-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms ease;
}

.equipment-card__media:hover .equipment-card__img {
  transform: scale(1.04);
}

.equipment-card__no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.35);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
}

.equipment-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 18, 32, 0);
  transition: background 220ms ease;
}

.equipment-card__media:hover .equipment-card__overlay {
  background: rgba(11, 18, 32, 0.44);
}

.equipment-card__zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 220ms ease, transform 220ms ease;
}

.equipment-card__media:hover .equipment-card__zoom {
  opacity: 1;
  transform: scale(1);
}

/* ─── Card body ───────────────────────────────────── */

.equipment-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.equipment-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.equipment-card__group,
.equipment-card__subgroup {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 999px;
}

.equipment-card__group {
  background: rgba(247, 197, 30, 0.18);
  color: #7a5f00;
}

.equipment-card__subgroup {
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
}

.equipment-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.equipment-card__qty {
  font-size: 13px;
  color: var(--muted);
}

.equipment-card__qty strong {
  color: var(--text);
  font-weight: 800;
}

.equipment-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  flex: 1;
}

.equipment-card__more {
  align-self: flex-start;
  margin-top: auto;
  font-size: 13px;
  padding: 8px 16px;
  height: auto;
  cursor: pointer;
}

/* ─── Pagination ──────────────────────────────────── */

.equipment__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.equipment__pagination[hidden] {
  display: none !important;
}

.equipment__page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

.equipment__page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(247, 197, 30, 0.10);
}

.equipment__page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.equipment__page-info {
  font-size: 14px;
  color: var(--muted);
  min-width: 80px;
  text-align: center;
}

/* ─── Modal ───────────────────────────────────────── */

.equipment-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.equipment-modal[hidden] {
  display: none !important;
}

.equipment-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.68);
  cursor: pointer;
}

.equipment-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1000px;
  width: 100%;
  max-height: calc(100dvh - 48px);
  border-radius: 24px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22);
  animation: equipmentModalIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes equipmentModalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.equipment-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms ease;
}

.equipment-modal__close:hover {
  background: var(--accent);
}

.equipment-modal__media {
  position: relative;
  background: rgba(15, 23, 42, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.equipment-modal__img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 600px;
  object-fit: contain;
  object-position: center;
  background: #f8fafc;
}

.equipment-modal__media[hidden] {
  display: none !important;
}

.equipment-modal__content {
  padding: 40px 40px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.equipment-modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.equipment-modal__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 999px;
}

.equipment-modal__tag--group {
  background: rgba(247, 197, 30, 0.2);
  color: #7a5f00;
}

.equipment-modal__tag--subgroup {
  background: rgba(15, 23, 42, 0.07);
  color: var(--muted);
}

.equipment-modal__title {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
}

.equipment-modal__qty {
  font-size: 15px;
  color: var(--muted);
  padding: 8px 0;
}

.equipment-modal__qty strong {
  color: var(--text);
  font-weight: 800;
}

.equipment-modal__qty[hidden] {
  display: none !important;
}

.equipment-modal__body {
  font-size: 16px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-line;
  padding: 8px 0;
}

/* ─── Responsive ──────────────────────────────────── */

@media (max-width: 1280px) {
  .equipment__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .section--equipment {
    padding: 52px 0;
  }

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

  .equipment-modal {
    padding: 20px;
  }

  .equipment-modal__dialog {
    grid-template-columns: 1fr;
    max-width: 580px;
    max-height: calc(100dvh - 40px);
  }

  .equipment-modal__content {
    padding: 32px 32px 28px;
  }

  .equipment-modal__img {
    max-height: 320px;
  }

  .equipment-modal__title {
    font-size: 24px;
  }
}

@media (max-width: 620px) {
  .equipment__filters {
    display: none;
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
  }

  .equipment__filters {
    display: none;
  }

  .equipment__filters.is-open {
    display: flex;
  }

  .equipment__filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .equipment__filters-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
  }

  .equipment__filters-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 200ms ease;
    font-size: 20px;
    color: var(--text);
  }

  .equipment__filters-close:hover {
    background: rgba(15, 23, 42, 0.08);
  }

  .equipment__filters-content {
    background: white;
    padding: 20px;
    flex: 1;
  }

  .equipment__filters-content .equipment__filters-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .equipment__filter-btn {
    width: 100%;
    justify-content: center;
    height: 44px;
    font-size: 14px;
    
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    display: block;
  }

  .equipment__filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: border-color 200ms ease;
  }

  .equipment__filter-toggle:hover {
    border-color: rgba(247, 197, 30, 0.55);
  }

  .equipment__filter-toggle-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
  }

  .equipment__filter-toggle-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
  }

  .equipment-card__qty {
    display: none;
  }

  .equipment-card__desc {
    display: none;
  }

  .equipment-card__body {
    padding: 16px;
  }

  .equipment-card__title {
    font-size: 16px;
    margin: 8px 0 0;
  }

  .equipment-card__meta {
    margin-bottom: 4px;
  }

  .equipment-card__group,
  .equipment-card__subgroup {
    font-size: 12px;
  }

  .equipment__grid {
    grid-template-columns: 1fr;
  }

  .equipment-modal {
    padding: 16px;
  }

  .equipment-modal__dialog {
    max-width: 100%;
    max-height: calc(100dvh - 32px);
    border-radius: 20px;
  }

  .equipment-modal__content {
    padding: 24px 24px 20px;
    gap: 16px;
  }

  .equipment-modal__title {
    font-size: 22px;
    line-height: 1.3;
  }

  .equipment-modal__body {
    font-size: 15px;
    line-height: 1.6;
  }

  .equipment-modal__img {
    max-height: 280px;
  }
}
