:root {
  --main-red: #c00;
  --gray-border: #ededed;
  --box-radius: 14px;
  --card-shadow: 0 2px 12px rgba(110, 110, 110, 0.09);
  --accent-bg: #ffe2e2;
  --graphite: #303030;
}

/* Layout i kontener */
.equipment-container {
  padding: 26px 0;
  max-width: 950px;
  margin: 0 auto;
}
.send-btn {
  margin: 32px 0 18px 0;
  background: var(--main-red);
  color: #fff;
  padding: 13px 32px;
  border: none;
  border-radius: 19px;
  font-size: 1.07rem;
  font-weight: 600;
  box-shadow: 0 2px 10px #dbe4ec40;
  cursor: pointer;
  transition: background 0.2s;
}
.send-btn:hover {
  background: #a00;
}

/* Karta: ogólna (info, sekcje) */
.equipment-card {
  background: #fff;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: flex-start;
  margin-bottom: 22px;
  border: 1px solid var(--gray-border);
  transition: box-shadow 0.16s;
}
.equipment-card img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 5px;
  margin: 10px;
}

.equipment-card .equipment-info {
  padding: 18px 22px;
}
.equipment-card h3 {
  color: var(--main-red);
  font-size: 1.15rem;
  margin: 0 0 6px 0;
  font-weight: 700;
}
.equipment-card p {
  margin: 0;
  color: #3b3647;
  font-size: 1rem;
}

.equipment-card.child {
  box-shadow: none;
  border: 1px solid var(--gray-border);
  margin-bottom: 12px;
  background: #faf8fb;
}

/* Sekcja */
.equipment-section {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 22px;
  border: 1px solid var(--gray-border);
  box-shadow: var(--card-shadow);
  padding: 18px 22px;
}
.equipment-section h3 {
  margin-bottom: 17px;
  margin-top: 0px;
  font-size: 1.14rem;
  color: var(--main-red);
}
.equipment-section-info h3 {
  color: var(--main-red);
  font-size: 1.12rem;
  margin: 0 0 8px 0;
  font-weight: 700;
}
.equipment-section-info p {
  margin: 0;
  color: #3b3647;
  font-size: 0.99rem;
}

/* Accordion + chevron SVG */
.equipment-accordion {
  margin-bottom: 25px;
  background: #fff;
  border: 1px solid var(--gray-border);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.16s;
}
.equipment-accordion .accordion-title {
  cursor: pointer;
  padding: 18px 24px;
  font-size: 1.08rem;
  color: var(--main-red);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  border-radius: var(--box-radius) var(--box-radius) 0 0;
  background: #fff;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.accordion-chevron {
  display: flex;
  align-items: center;
  transition: transform 0.25s;
  margin-left: 14px;
  color: #a5a5a5;
}
.equipment-accordion.open .accordion-chevron {
  transform: rotate(-180deg);
}
.equipment-accordion .accordion-title svg {
  width: 22px;
  height: 22px;
  display: block;
}
.equipment-accordion .accordion-content {
  padding: 15px 28px 17px 28px;
  border-top: 1.3px solid var(--gray-border);
  display: none;
}
.equipment-accordion.open .accordion-content {
  animation: fadeInA 0.32s;
}
@keyframes fadeInA {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slider Header i arrow */
.equipment-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
}
.equipment-slider-header h3 {
  margin: 0;
  font-size: 1.14rem;
  color: var(--main-red);
  flex: 1;
  text-transform: uppercase;
}
.slider-arrow.circle {
  background: #fff;
  border: 1px solid var(--main-red);
  color: var(--main-red);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  font-size: 1.38em;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(110, 0, 0, 0.1);
  transition: background 0.18s, color 0.18s;
}
.slider-arrow.circle:active,
.slider-arrow.circle:hover {
  background: #ffe2e2;
  color: var(--main-red);
  border-color: #a00;
}
.slider-arrow svg {
  display: block;
}

/* Karuzela i kafelki wyboru */
.equipment-carousel {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  padding-bottom: 8px;
  width: 100%;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.equipment-carousel::-webkit-scrollbar {
  display: none;
}
.equipment-choice-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--graphite);
  box-shadow: 0 2px 12px rgba(110, 0, 0, 0.08);
  position: relative;
  transition: border 0.18s;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 6px;

  /* Adaptacyjna szerokość, ustawiona JS'em inline! */
  flex: 0 0 auto;
  width: var(--carousel-card-width, 320px); /* fallback */
  min-width: 220px;
  max-width: 99vw;
}

.equipment-choice-card.selected,
.equipment-choice-card:hover {
  border-color: var(--main-red);
  z-index: 2;
}
.equipment-choice-card:last-child {
  margin-right: 0;
}
.equipment-choice-card:not(:last-child) {
  box-shadow: 8px 0 12px -6px #fff inset;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 300px;
}

.card-image-wrap,
.card-image-wrap img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}
.card-image-wrap .slider-container .slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.85);
}

.card-image-wrap .slider-container img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: transform 0.35s ease;
  z-index: 1;
  pointer-events: none; /* Zapobiega problemom kliknięć */
  z-index: 1;
}

.card-image-wrap .slider-container img.current {
  z-index: 1;
}

.card-image-wrap .slider-container img.next {
  z-index: 2;
}

.card-image-wrap .slider-container .slider-arrow.left {
  left: 2px;
}
.card-image-wrap .slider-container .slider-arrow.right {
  right: 12px;
}

.slider-arrow.hidden {
  display: none !important;
}

.card-title {
  font-weight: 700;
  font-size: 1.07em;
  line-height: 1.2;
}

.card-radio {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.card-radio input[type='radio'] {
  opacity: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  position: absolute;
  left: 0;
  top: 0;
}
.radio-custom {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 1px solid #d3d3d3;
  border-radius: 50%;
  background: #fff;
  transition: border 0.18s, background 0.18s;
}
input[type='radio']:checked + .radio-custom {
  background: var(--main-red);
  border: 1px solid rgba(0, 0, 0, 0.2);
}
input[type='radio']:checked + .radio-custom:after {
  content: '';
  display: block;
  border-radius: 50%;
  background: var(--main-red);
  width: 100%;
  height: 100%;
}

/* Overlay (opis, nazwa, animacja) */
.card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(48, 48, 48, 0.74);
  color: #fff;
  padding: 16px 16px 12px 16px;
  /* backdrop-filter: blur(7px); */
  z-index: 3;
  min-height: 54px;
  gap: 5px;
  transition: min-height 0.25s, background 0.25s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.card-overlay.expanded {
  min-height: 300px;
  top: 0;
  bottom: 0;
  background: rgba(34, 34, 34, 0.66);
  border-radius: 18px;
  justify-content: flex-end;
  padding-top: 46px;
}
.card-desc-wrap {
  display: flex;
  align-items: flex-start;
}
.card-desc {
  font-size: 0.97em;
  color: #fff;
  opacity: 0.92;
  font-weight: 400;
  line-height: 1.36;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 95%;
  transition: max-width 0.25s, white-space 0.18s;
}
.card-overlay.expanded .card-desc {
  white-space: normal;
  overflow: visible;
  width: 95%;
}
.desc-chevron {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.97em;
  margin-left: 6px;
  cursor: pointer;
  transition: color 0.2s;
  padding-top: 0;
  margin-top: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.desc-chevron:hover {
  color: var(--main-red);
}

@media (max-width: 950px) {
  .equipment-container {
    max-width: 99vw;
    padding: 0 2vw;
  }
  .equipment-card,
  .equipment-section {
    flex-direction: column;
    align-items: stretch;
  }
  .equipment-card img,
  .equipment-section img.equipment-thumb {
    width: 100%;
    height: 300px;
    margin: 0;
  }
  .equipment-card .equipment-info,
  .equipment-section-info {
    padding: 12px 8px;
  }
  .equipment-choice-card,
  .card-image-wrap,
  .card-image-wrap img {
    height: 300px;
  }
}
