:root {
  --cdt-brand-dark: #222;
  --cdt-gray: #6b7280;
  --cdt-gray-light: #e5e7eb;
  --cdt-white: #fff;
  --cdt-price: #27843f;
}

.cdt-releases-wrap {
  display: grid;
  grid-template-columns: repeat(var(--cdt-desktop-cols, 4), minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
}

@media (max-width: 991px) {
  .cdt-releases-wrap {
    grid-template-columns: repeat(var(--cdt-tablet-cols, 2), minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .cdt-releases-wrap {
    grid-template-columns: repeat(var(--cdt-mobile-cols, 1), minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.cdt-release-card {
  background: var(--cdt-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(0,0,0,.10);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cdt-card-image {
  position: relative;
  display: block;
  background: #ddd;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  text-decoration: none;
}

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

.cdt-no-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: .9rem;
}

.cdt-publisher-badge {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 90%;
  padding: .25rem .55rem;
  font-size: .62rem;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0,0,0,.78);
  color: #fff;
}

.cdt-card-content {
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}

.cdt-card-title {
  margin: 0;
  font-size: .95rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--cdt-brand-dark);
}

.cdt-card-title a {
  color: inherit;
  text-decoration: none;
}

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

.cdt-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-top: auto;
  font-size: .82rem;
  color: var(--cdt-gray);
}

.cdt-price {
  color: var(--cdt-price);
  font-weight: 700;
}

.cdt-buy-links {
  position: relative;
  margin-top: .25rem;
}

.cdt-buy-toggle {
  width: 100%;
  border: 1px solid var(--cdt-gray-light);
  background: #f8f8f8;
  padding: .55rem .75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.cdt-buy-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--cdt-gray-light);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
  overflow: hidden;
}

.cdt-buy-links.is-open .cdt-buy-dropdown {
  display: block;
}

.cdt-buy-dropdown a {
  display: block;
  padding: .65rem .85rem;
  color: var(--cdt-brand-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--cdt-gray-light);
}

.cdt-buy-dropdown a:last-child {
  border-bottom: 0;
}

.cdt-buy-dropdown a:hover {
  background: #f5f5f5;
}

.cdt-publisher-section {
  margin-bottom: 2.5rem;
}

.cdt-publisher-title {
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--cdt-gray-light);
  font-size: 1.25rem;
}

.cdt-count {
  font-size: .9rem;
  color: var(--cdt-gray);
  font-weight: 400;
}

.cdt-no-releases {
  padding: 2rem;
  background: #f7f7f7;
  color: var(--cdt-gray);
  text-align: center;
  border-radius: 8px;
}

.cdt-layout-list {
  display: block;
}

.cdt-layout-list .cdt-release-card {
  flex-direction: row;
  margin-bottom: 1rem;
}

.cdt-layout-list .cdt-card-image {
  width: 110px;
  min-width: 110px;
}

@media (max-width: 767px) {
  .cdt-layout-list .cdt-release-card {
    flex-direction: row;
  }

  .cdt-layout-list .cdt-card-image {
    width: 92px;
    min-width: 92px;
  }
}

.cdt-publisher-filter {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 2rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--cdt-gray-light);
  border-radius: 8px;
}

.cdt-filter-label {
  font-weight: 700;
  color: var(--cdt-brand-dark);
}

.cdt-publisher-filter select {
  min-width: 220px;
  padding: .6rem .75rem;
  border: 1px solid var(--cdt-gray-light);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

@media (max-width: 767px) {
  .cdt-publisher-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .cdt-publisher-filter select {
    width: 100%;
    min-width: 0;
  }
}
