/* =========================
   CONTENEDOR GENERAL
   ========================= */
.ccs-wrapper {
  margin: 18px 0;
}

.ccs-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ccs-nav {
  display: flex;
  gap: 8px;
}

.ccs-btn-nav {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.ccs-btn-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* =========================
   ESTADO AJAX
   ========================= */
.ccs-ajax-content {
  width: 100%;
  min-width: 0;
}

.ccs-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  color: #6b7280;
  font-size: 14px;
}

.ccs-loading-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: ccs-spin 0.75s linear infinite;
}

@keyframes ccs-spin {
  to { transform: rotate(360deg); }
}

.ccs-empty-message {
  margin: 0;
  padding: 18px 0;
  color: #666;
}

.ccs-error-message {
  color: #9b2c2c;
}

/* =========================
   CARRUSEL
   ========================= */
.ccs-carousel {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.ccs-track {
  display: flex;
  flex-direction: row;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch;
}

.ccs-track::-webkit-scrollbar {
  display: none;
}

/* =========================
   TARJETA ESTILO CAMPA
   ========================= */
.ccs-card-item {
  flex: 0 0 360px;
  max-width: 360px;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: start;
  box-sizing: border-box;
}

/* =========================
   IMAGEN
   ========================= */
.ccs-card-image-link {
  display: block;
  position: relative;
  height: 210px;
  background: #f3f4f6;
  text-decoration: none;
}

.ccs-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   CONTENIDO
   ========================= */
.ccs-card-content {
  padding: 14px 16px 16px;
}

.ccs-card-title {
  display: -webkit-box;
  margin-bottom: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-decoration: none;
  text-transform: uppercase;
}

.ccs-card-title:hover {
  text-decoration: underline;
}

.ccs-card-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #6b7280;
  font-size: 12.5px;
  line-height: 1.35;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  .ccs-wrapper {
    margin: 12px 0;
  }

  .ccs-header {
    margin-bottom: 8px;
  }

  .ccs-btn-nav {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 20px;
  }

  .ccs-track {
    gap: 12px;
    padding: 2px 12px 12px;
    scroll-padding-left: 12px;
  }

  .ccs-card-item {
    flex: 0 0 calc(100% - 24px);
    max-width: calc(100% - 24px);
  }

  .ccs-card-image-link {
    height: 190px;
  }

  .ccs-card-content {
    padding: 12px 14px 14px;
  }

  .ccs-card-title {
    font-size: 13px;
    line-height: 1.25;
  }

  .ccs-card-description {
    font-size: 12px;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  .ccs-card-item {
    flex-basis: calc(100% - 24px);
    max-width: calc(100% - 24px);
  }

  .ccs-card-image-link {
    height: 170px;
  }

  .ccs-card-title {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccs-loading-spinner {
    animation: none;
  }

  .ccs-track {
    scroll-behavior: auto;
  }
}
