.ms-course-card-wrap {
    padding: 10px;
}

.ms-card {
    position: relative;
    width: 100%;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    transition: .25s ease;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.04);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    font-family: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ms-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
}

.ms-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(45deg,#b3002e,#e14b4b);
    color: #fff;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    z-index: 5;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.ms-badge.ms-free {
    background: linear-gradient(45deg,#0f766e,#14b8a6);
}

.ms-tilt {
    overflow: hidden;
}
.ms-img {
    height: 180px;
    background: #e5e7eb;
    overflow: hidden;
}
.ms-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}
.ms-card:hover .ms-img img {
    transform: scale(1.05);
}

.ms-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ms-cat {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 6px;
}

.ms-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
    line-height: 1.3;
    letter-spacing: -.03em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-desc {
    font-size: 13px;
    line-height: 1.4;
    color: #4b5563;
    margin: 0 0 14px;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-feats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.ms-feat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    line-height: 1.2;
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 500;
}

.ms-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 16px;
    row-gap: 10px;
}

.ms-price {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.ms-price-old {
    font-size: 12px;
    text-decoration: line-through;
    color: #9ca3af;
    font-weight: 400;
    margin-bottom: 2px;
}
.ms-price-new {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.ms-btn {
  background-color: #0b5ed7; /* azul pleno */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


/* Estado agregado al carrito */
.ms-btn.ms-in-cart {
  background-color: #1e7e34; /* verde pleno */
  color: #ffffff !important;
}

/* Hover cuando está agregado */
.ms-btn.ms-in-cart:hover {
  background-color: #18662a;
}

/* Hover */
.ms-btn:hover {
  background-color: #0949aa; /* un tono más oscuro */
  color: #ffffff;
  transform: translateY(-1px);
}


/* Ícono del carrito */
.ms-btn .ms-icon {
  font-size: 14px;
}


.ms-btn:hover .ms-icon {
    transform: translateX(2px) scale(1.05);
}

.ms-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
    margin-top: auto;
}

.ms-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 2px;
    font-size: 12px;
    color: #374151;
    line-height: 1.2;
}
.ms-star {
    font-size: 12px;
    color: #d1d5db;
}
.ms-star.filled {
    color: #facc15;
}
.ms-rcount {
    margin-left: 4px;
    font-size: 11px;
    color: #6b7280;
}

.ms-teacher {
    display: flex;
    align-items: center;
    column-gap: 6px;
    max-width: 50%;
}
.ms-teacher-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.05);
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.ms-teacher-name {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
    color: #374151;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-course-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

@media (max-width: 480px) {
    .ms-img {
        height: 160px;
    }
    .ms-title {
        font-size: 16px;
    }
    .ms-price-new {
        font-size: 18px;
    }
    .ms-btn {
        width: 100%;
        justify-content: center;
    }
    .ms-bottom {
        flex-direction: column;
        align-items: stretch;
    }
    .ms-price {
        flex-direction: row;
        align-items: baseline;
        column-gap: 8px;
    }
    .ms-price-old {
        margin-bottom: 0;
    }
}

/* Quitamos gradientes globales */
button,
input[type="button"],
input[type="submit"] {
  background-image: none !important;
}